Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
08cddbb
Sets the tag correctly when making a release (#1023)
FantasyTeddy Oct 26, 2025
db99496
Merge pull request #1021 from J005t67/bugfix/1019-HarvesterFrontHitch…
J005t67 Oct 26, 2025
0bdd9a4
Merge pull request #1022 from J005t67/bugfix/917--articulated-hitch-i…
J005t67 Oct 26, 2025
687e9bf
Merge pull request #1029 from AgOpenGPS-Official/fixesFromOtherBranch
richardklasens Oct 28, 2025
7ce1b6d
CABLine: do not compute vertices twice
J005t67 Oct 26, 2025
9b7d73a
CABLine: Simplify and check vertex calculations
J005t67 Oct 27, 2025
bd73393
CABLine: remove old code
J005t67 Oct 27, 2025
1410f4a
CABLine: fix #1026 one extra Guideline too many
J005t67 Oct 27, 2025
b73fcb9
CABLine: separation of odd and even lines help to simplify code -> si…
J005t67 Oct 27, 2025
ff0dfcb
CABLine: fix #1025 half of extra guidelines do not show green forgrou…
J005t67 Oct 27, 2025
e3619e7
Merge pull request #1034 from FantasyTeddy/bugfix/1026-one-guideline-…
FantasyTeddy Oct 31, 2025
614d492
Rephrase 'Delete For Sure' -> 'Are you sure you want to delete?'
J005t67 Nov 3, 2025
865fe95
Merge pull request #1036 from J005t67/bugfix/906-sure-to-delete
J005t67 Nov 5, 2025
cbfef95
add trackcopier
richardklasens Nov 10, 2025
e58805d
Address code review feedback for track import feature
richardklasens Nov 14, 2025
16c3900
Fix track index crash after importing tracks
richardklasens Nov 14, 2025
f136680
Merge pull request #1040 from AgOpenGPS-Official/Trackcopier
richardklasens Nov 15, 2025
c725fd9
Merge pull request #1046 from AgOpenGPS-Official/fixes/6.8
richardklasens Nov 19, 2025
88665e7
Downgrade GitVersion (#1048)
FantasyTeddy Nov 19, 2025
31c9241
Merge pull request #1049 from AgOpenGPS-Official/release/6.8
FantasyTeddy Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
uses: actions/setup-dotnet@v4

- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v4.1.0
uses: gittools/actions/gitversion/setup@v3.2.0
with:
versionSpec: '6.3.x'
versionSpec: '5.12.x'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v4.1.0
uses: gittools/actions/gitversion/execute@v3.2.0
with:
updateProjectFiles: true

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
uses: actions/setup-dotnet@v4

- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v4.1.0
uses: gittools/actions/gitversion/setup@v3.2.0
with:
versionSpec: '6.3.x'
versionSpec: '5.12.x'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v4.1.0
uses: gittools/actions/gitversion/execute@v3.2.0
with:
updateProjectFiles: true

Expand All @@ -63,6 +63,7 @@ jobs:
with:
name: Release ${{ env.GitVersion_SemVer }}
tag_name: ${{ env.GitVersion_SemVer }}
target_commitish: ${{ github.sha }}
body: |
Automated Release by GitHub Action CI
draft: ${{ github.ref_name == 'master' }}
Expand Down
5 changes: 5 additions & 0 deletions SourceCode/AgOpenGPS.Core/DrawLib/GLW.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ private static void DrawPrimitiveLayered(
vertex2Array.DeleteBuffer();
}

public static void Vertex2(GeoCoord geoCoord)
{
GL.Vertex2(geoCoord.Easting, geoCoord.Northing);
}

public static void Translate(double x, double y, double z)
{
GL.Translate(x, y, z);
Expand Down
3 changes: 3 additions & 0 deletions SourceCode/AgOpenGPS.Core/Models/Base/GeoDir.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public GeoDir(GeoDelta delta)
{
AngleInRadians = Math.Atan2(delta.EastingDelta, delta.NorthingDelta);
}
public GeoDir(GeoCoord fromCoord, GeoCoord toCoord) : this(new GeoDelta(fromCoord, toCoord))
{
}

public double AngleInRadians { get; }
public double AngleInDegrees => Units.RadiansToDegrees(AngleInRadians);
Expand Down
24 changes: 24 additions & 0 deletions SourceCode/AgOpenGPS.Core/Models/Base/GeoLine.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;

namespace AgOpenGPS.Core.Models
{
public struct GeoLine
{
public GeoLine(GeoCoord coordA, GeoCoord coordB)
{
CoordA = coordA;
CoordB = coordB;
}

public GeoCoord CoordA { get; }
public GeoCoord CoordB { get; }

public GeoDir Direction => new GeoDir(CoordA, CoordB);

public GeoLine ParallelLine(GeoDelta offset)
{
return new GeoLine(CoordA + offset, CoordB + offset);
}

}
}
2 changes: 1 addition & 1 deletion SourceCode/AgOpenGPS.Core/Translations/gStr.Designer.cs

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

2 changes: 1 addition & 1 deletion SourceCode/AgOpenGPS.Core/Translations/gStr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ The order you push them will be the order they appear on the menu from bottom up
<value>Delete Field</value>
</data>
<data name="gsDeleteForSure" xml:space="preserve">
<value>Delete For Sure?</value>
<value>Are you sure you want to delete?</value>
</data>
<data name="gsDiameter" xml:space="preserve">
<value>Diameter</value>
Expand Down
168 changes: 36 additions & 132 deletions SourceCode/GPS/Classes/CABLine.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using AgOpenGPS.Core.DrawLib;
using AgOpenGPS.Core.Models;
using OpenTK.Graphics.OpenGL;
using System;
Expand Down Expand Up @@ -431,145 +432,48 @@ public void DrawABLines()

if (mf.isSideGuideLines && mf.camera.camSetDistance > mf.tool.width * -400)
{
//get the tool offset and width
double toolOffset = mf.tool.offset * 2;
double toolWidth = mf.tool.width - mf.tool.overlap;
double cosHeading = Math.Cos(-abHeading);
double sinHeading = Math.Sin(-abHeading);

if (toolOffset == 0)
//heavy shadow
GL.Color4(0, 0, 0, 0.5);
GL.LineWidth(lineWidth * 3);
GL.Begin(PrimitiveType.Lines);
GeoLine currentLine = new GeoLine(currentLinePtA.ToGeoCoord(), currentLinePtB.ToGeoCoord());
GeoDir perpendicularRightDir = currentLine.Direction.PerpendicularRight;
List<GeoLine> lines = new List<GeoLine>();

double oddOffset = 2 * (isHeadingSameWay ? mf.tool.offset : -mf.tool.offset);
for (int i = 1; i <= numGuideLines; i += 2)
{
GL.Color4(0, 0, 0, 0.5);
GL.LineWidth(lineWidth * 3);
GL.Begin(PrimitiveType.Lines);

for (int i = 1; i <= numGuideLines; i++)
{
GL.Vertex3((cosHeading * (toolWidth * i)) + currentLinePtA.easting, (sinHeading * (toolWidth * i)) + currentLinePtA.northing, 0);
GL.Vertex3((cosHeading * (toolWidth * i)) + currentLinePtB.easting, (sinHeading * (toolWidth * i)) + currentLinePtB.northing, 0);

GL.Vertex3((cosHeading * (-toolWidth * i)) + currentLinePtA.easting, (sinHeading * (-toolWidth * i)) + currentLinePtA.northing, 0);
GL.Vertex3((cosHeading * (-toolWidth * i)) + currentLinePtB.easting, (sinHeading * (-toolWidth * i)) + currentLinePtB.northing, 0);
}
GL.End();

GL.Color4(0.19907f, 0.6f, 0.19750f, 0.6f);
GL.LineWidth(lineWidth);
GL.Begin(PrimitiveType.Lines);

for (int i = 1; i <= numGuideLines; i += 2)
{
GL.Vertex3((cosHeading * (toolWidth * i)) + currentLinePtA.easting, (sinHeading * (toolWidth * i)) + currentLinePtA.northing, 0);
GL.Vertex3((cosHeading * (toolWidth * i)) + currentLinePtB.easting, (sinHeading * (toolWidth * i)) + currentLinePtB.northing, 0);

GL.Vertex3((cosHeading * (-toolWidth * i)) + currentLinePtA.easting, (sinHeading * (-toolWidth * i)) + currentLinePtA.northing, 0);
GL.Vertex3((cosHeading * (-toolWidth * i)) + currentLinePtB.easting, (sinHeading * (-toolWidth * i)) + currentLinePtB.northing, 0);
}
GL.End();
GeoLine rightOddLine = currentLine.ParallelLine((toolWidth * i + oddOffset) * perpendicularRightDir);
GeoLine leftOddLine = currentLine.ParallelLine((toolWidth * -i + oddOffset) * perpendicularRightDir);
lines.Add(rightOddLine);
lines.Add(leftOddLine);
}
else
for (int i = 2; i <= numGuideLines; i += 2)
{
toolOffset *= 0.5;

vec3 mA = new vec3();
vec3 mB = new vec3();

if (!isHeadingSameWay)
{
toolOffset *= -1;
}

mA.easting = cosHeading * toolOffset + currentLinePtA.easting;
mA.northing = sinHeading * toolOffset + currentLinePtA.northing;

mB.easting = cosHeading * toolOffset + currentLinePtB.easting;
mB.northing = sinHeading * toolOffset + currentLinePtB.northing;

//heavy shadow
GL.Color4(0, 0, 0, 0.5);
GL.LineWidth(lineWidth * 3);
GL.Begin(PrimitiveType.Lines);

for (int i = 1; i <= numGuideLines; i++)
{
GL.Vertex3((cosHeading * ((toolWidth * i) + toolOffset)) + mA.easting, (sinHeading * ((toolWidth * i) + toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * i) + toolOffset)) + mB.easting, (sinHeading * ((toolWidth * i) + toolOffset)) + mB.northing, 0);

GL.Vertex3((cosHeading * ((toolWidth * -i) + toolOffset)) + mA.easting, (sinHeading * ((toolWidth * -i) + toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * -i) + toolOffset)) + mB.easting, (sinHeading * ((toolWidth * -i) + toolOffset)) + mB.northing, 0);

i++;

GL.Vertex3((cosHeading * ((toolWidth * i) - toolOffset)) + mA.easting, (sinHeading * ((toolWidth * i) - toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * i) - toolOffset)) + mB.easting, (sinHeading * ((toolWidth * i) - toolOffset)) + mB.northing, 0);

GL.Vertex3((cosHeading * ((toolWidth * -i) - toolOffset)) + mA.easting, (sinHeading * ((toolWidth * -i) - toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * -i) - toolOffset)) + mB.easting, (sinHeading * ((toolWidth * -i) - toolOffset)) + mB.northing, 0);
}
GL.End();

//green lines
GL.Color4(0.19907f, 0.6f, 0.19750f, 0.6f);
GL.LineWidth(lineWidth);
GL.Begin(PrimitiveType.Lines);

for (int i = 1; i <= numGuideLines; i++)
{
GL.Vertex3((cosHeading * ((toolWidth * i) + toolOffset)) + mA.easting, (sinHeading * ((toolWidth * i) + toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * i) + toolOffset)) + mB.easting, (sinHeading * ((toolWidth * i) + toolOffset)) + mB.northing, 0);

GL.Vertex3((cosHeading * ((toolWidth * -i) + toolOffset)) + mA.easting, (sinHeading * ((toolWidth * -i) + toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * -i) + toolOffset)) + mB.easting, (sinHeading * ((toolWidth * -i) + toolOffset)) + mB.northing, 0);

i++;

GL.Vertex3((cosHeading * ((toolWidth * i) - toolOffset)) + mA.easting, (sinHeading * ((toolWidth * i) - toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * i) - toolOffset)) + mB.easting, (sinHeading * ((toolWidth * i) - toolOffset)) + mB.northing, 0);

GL.Vertex3((cosHeading * ((toolWidth * -i) - toolOffset)) + mA.easting, (sinHeading * ((toolWidth * -i) - toolOffset)) + mA.northing, 0);
GL.Vertex3((cosHeading * ((toolWidth * -i) - toolOffset)) + mB.easting, (sinHeading * ((toolWidth * -i) - toolOffset)) + mB.northing, 0);
}
GL.End();
GeoLine rightEvenLine = currentLine.ParallelLine((toolWidth * i) * perpendicularRightDir);
GeoLine leftEvenLine = currentLine.ParallelLine((toolWidth * -i) * perpendicularRightDir);
lines.Add(rightEvenLine);
lines.Add(leftEvenLine);
}
}
for (int i = 0; i < lines.Count; i++)
{
GLW.Vertex2(lines[i].CoordA);
GLW.Vertex2(lines[i].CoordB);
}
GL.End();

if (!mf.isStanleyUsed && mf.camera.camSetDistance > -200)
{
////Draw lookahead Point
//GL.PointSize(16.0f);
//GL.Begin(PrimitiveType.Points);
//GL.Color3(1.0f, 1.0f, 0.0f);
//GL.Vertex3(goalPointAB.easting, goalPointAB.northing, 0.0);
////GL.Vertex3(mf.gyd.rEastSteer, mf.gyd.rNorthSteer, 0.0);
////GL.Vertex3(mf.gyd.rEastPivot, mf.gyd.rNorthPivot, 0.0);
//GL.End();
//GL.PointSize(1.0f);

//if (ppRadiusAB < 50 && ppRadiusAB > -50)
//{
// const int numSegments = 200;
// double theta = glm.twoPI / numSegments;
// double c = Math.Cos(theta);//precalculate the sine and cosine
// double s = Math.Sin(theta);
// //double x = ppRadiusAB;//we start at angle = 0
// double x = 0;//we start at angle = 0
// double y = 0;

// GL.LineWidth(2);
// GL.Color3(0.53f, 0.530f, 0.950f);
// GL.Begin(PrimitiveType.Lines);
// for (int ii = 0; ii < numSegments - 15; ii++)
// {
// //glVertex2f(x + cx, y + cy);//output vertex
// GL.Vertex3(x + radiusPointAB.easting, y + radiusPointAB.northing, 0);//output vertex
// double t = x;//apply the rotation matrix
// x = (c * x) - (s * y);
// y = (s * t) + (c * y);
// }
// GL.End();
//}
//green lines
GL.Color4(0.19907f, 0.6f, 0.19750f, 0.6f);
GL.LineWidth(lineWidth);
GL.Begin(PrimitiveType.Lines);
for (int i = 0; i < lines.Count; i++)
{
GLW.Vertex2(lines[i].CoordA);
GLW.Vertex2(lines[i].CoordB);
}
GL.End();
}

mf.yt.DrawYouTurn();

GL.PointSize(1.0f);
Expand Down
Loading