Skip to content

Commit

Permalink
Svenn setting
Browse files Browse the repository at this point in the history
  • Loading branch information
farmerbriantee committed Oct 25, 2023
1 parent 3a60fd7 commit 43a9283
Show file tree
Hide file tree
Showing 13 changed files with 279 additions and 197 deletions.
1 change: 1 addition & 0 deletions SourceCode/GPS/AgOpenGPS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@
<None Include="btnImages\BackSpace.png" />
<None Include="btnImages\SectionOnBoundary.png" />
<None Include="btnImages\BoundaryCurveLineInner.png" />
<None Include="btnImages\SvennArrow.png" />
<Content Include="Nav.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
12 changes: 7 additions & 5 deletions SourceCode/GPS/Classes/CVehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,15 +477,17 @@ public void DrawVehicle()
}

//Svenn Arrow
if (mf.camera.camSetDistance > -350)
if (mf.isSvennArrowOn && mf.camera.camSetDistance > -1000)
{
GL.LineWidth(1);
double svennDist = mf.camera.camSetDistance * -0.07;
double svennWidth = svennDist * 0.22;
GL.LineWidth(2);
GL.Color3(1.2, 1.25, 0.10);
GL.Begin(PrimitiveType.LineStrip);
{
GL.Vertex3(0.4, wheelbase + 5, 0.0);
GL.Vertex3(0, wheelbase + 6, 0.0);
GL.Vertex3(-0.4, wheelbase + 5, 0.0);
GL.Vertex3(svennWidth, wheelbase + svennDist, 0.0);
GL.Vertex3(0, wheelbase + svennWidth + 0.5 + svennDist, 0.0);
GL.Vertex3(-svennWidth, wheelbase + svennDist, 0.0);
}
GL.End();
}
Expand Down
4 changes: 3 additions & 1 deletion SourceCode/GPS/Forms/GUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions SourceCode/GPS/Forms/Guidance/FormABLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,14 @@ private void btnAPoint_Click(object sender, EventArgs e)

mf.ABLine.desPoint1.easting = fix.easting + Math.Cos(fix.heading) * mf.tool.offset;
mf.ABLine.desPoint1.northing = fix.northing - Math.Sin(fix.heading) * mf.tool.offset;
if (fix.heading >= glm.twoPI) fix.heading -= glm.twoPI;
mf.ABLine.desHeading = fix.heading;

mf.ABLine.desPoint2.easting = 99999;
mf.ABLine.desPoint2.northing = 99999;

nudHeading.Enabled = true;

nudHeading.Value = (decimal)(glm.toDegrees(mf.ABLine.desHeading));

BuildDesLine();
Expand Down
5 changes: 5 additions & 0 deletions SourceCode/GPS/Forms/Settings/ConfigVehicle.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 43a9283

Please sign in to comment.