Skip to content

Commit f0a84a3

Browse files
Merge pull request #409 from farmerbriantee/Kiosk
Kiosk
2 parents b7fe294 + 58d8fd0 commit f0a84a3

File tree

13 files changed

+497
-234
lines changed

13 files changed

+497
-234
lines changed

SourceCode/GPS/Classes/CABCurve.cs

Lines changed: 431 additions & 188 deletions
Large diffs are not rendered by default.

SourceCode/GPS/Classes/CTool.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@ public void DrawTool()
301301
//draw the sections
302302
GL.LineWidth(2);
303303

304-
double hite = mf.camera.camSetDistance / -200;
305-
if (hite > 0.5) hite = 0.5;
306-
if (hite < 0.3) hite = 0.3;
304+
double hite = mf.camera.camSetDistance / -150;
305+
if (hite > 12) hite = 12;
306+
if (hite < 1) hite = 1;
307307

308308
{
309309
for (int j = 0; j < numOfSections; j++)
@@ -340,7 +340,7 @@ public void DrawTool()
340340
}
341341
GL.End();
342342

343-
if (mf.camera.camSetDistance > -150)
343+
if (mf.camera.camSetDistance > -width * 200)
344344
{
345345
GL.Begin(PrimitiveType.LineLoop);
346346
{

SourceCode/GPS/Classes/CTrack.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public void NudgeTrack(double dist)
139139
else
140140
{
141141
mf.curve.isCurveValid = false;
142+
mf.curve.lastHowManyPathsAway = 98888;
142143
mf.curve.lastSecond = 0;
143144
gArr[idx].nudgeDistance += mf.curve.isHeadingSameWay ? dist : -dist;
144145

@@ -161,6 +162,7 @@ public void NudgeDistanceReset()
161162
else
162163
{
163164
mf.curve.isCurveValid = false;
165+
mf.curve.lastHowManyPathsAway = 98888;
164166
mf.curve.lastSecond = 0;
165167
}
166168

@@ -201,6 +203,7 @@ public void NudgeRefTrack(double dist)
201203
else
202204
{
203205
mf.curve.isCurveValid = false;
206+
mf.curve.lastHowManyPathsAway = 98888;
204207
mf.curve.lastSecond = 0;
205208
NudgeRefCurve( mf.curve.isHeadingSameWay ? dist : -dist);
206209
}
@@ -221,6 +224,7 @@ public void NudgeRefABLine(double dist)
221224
public void NudgeRefCurve(double distAway)
222225
{
223226
mf.curve.isCurveValid = false;
227+
mf.curve.lastHowManyPathsAway = 98888;
224228
mf.curve.lastSecond = 0;
225229

226230
List<vec3> curList = new List<vec3>();

SourceCode/GPS/Classes/CVehicle.cs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -523,47 +523,47 @@ public void DrawVehicle()
523523
}
524524
GL.LineWidth(1);
525525

526-
if (mf.camera.camSetDistance < -500)
527-
{
528-
GL.Color4(0.5f, 0.5f, 1.2f, 0.25);
529-
double theta = glm.twoPI / 20;
530-
double c = Math.Cos(theta);//precalculate the sine and cosine
531-
double s = Math.Sin(theta);
532-
533-
double x = mf.camera.camSetDistance * -.015;//we start at angle = 0
534-
double y = 0;
535-
GL.LineWidth(1);
536-
GL.Begin(PrimitiveType.TriangleFan);
537-
GL.Vertex3(x, y, 0.0);
538-
for (int ii = 0; ii < 20; ii++)
539-
{
540-
//output vertex
541-
GL.Vertex3(x, y, 0.0);
542-
543-
//apply the rotation matrix
544-
double t = x;
545-
x = (c * x) - (s * y);
546-
y = (s * t) + (c * y);
547-
// GL.Vertex3(x, y, 0.0);
548-
}
549-
GL.End();
550-
GL.Color3(0.5f, 1.2f, 0.2f);
551-
GL.LineWidth(2);
552-
GL.Begin(PrimitiveType.LineLoop);
553-
554-
for (int ii = 0; ii < 20; ii++)
555-
{
556-
//output vertex
557-
GL.Vertex3(x, y, 0.0);
558-
559-
//apply the rotation matrix
560-
double t = x;
561-
x = (c * x) - (s * y);
562-
y = (s * t) + (c * y);
563-
// GL.Vertex3(x, y, 0.0);
564-
}
565-
GL.End();
566-
}
526+
//if (mf.camera.camSetDistance < -500)
527+
//{
528+
// GL.Color4(0.5f, 0.5f, 1.2f, 0.25);
529+
// double theta = glm.twoPI / 20;
530+
// double c = Math.Cos(theta);//precalculate the sine and cosine
531+
// double s = Math.Sin(theta);
532+
533+
// double x = mf.camera.camSetDistance * -.015;//we start at angle = 0
534+
// double y = 0;
535+
// GL.LineWidth(1);
536+
// GL.Begin(PrimitiveType.TriangleFan);
537+
// GL.Vertex3(x, y, 0.0);
538+
// for (int ii = 0; ii < 20; ii++)
539+
// {
540+
// //output vertex
541+
// GL.Vertex3(x, y, 0.0);
542+
543+
// //apply the rotation matrix
544+
// double t = x;
545+
// x = (c * x) - (s * y);
546+
// y = (s * t) + (c * y);
547+
// // GL.Vertex3(x, y, 0.0);
548+
// }
549+
// GL.End();
550+
// GL.Color3(0.5f, 1.2f, 0.2f);
551+
// GL.LineWidth(2);
552+
// GL.Begin(PrimitiveType.LineLoop);
553+
554+
// for (int ii = 0; ii < 20; ii++)
555+
// {
556+
// //output vertex
557+
// GL.Vertex3(x, y, 0.0);
558+
559+
// //apply the rotation matrix
560+
// double t = x;
561+
// x = (c * x) - (s * y);
562+
// y = (s * t) + (c * y);
563+
// // GL.Vertex3(x, y, 0.0);
564+
// }
565+
// GL.End();
566+
//}
567567
}
568568
}
569569
}

SourceCode/GPS/Classes/CYouTurn.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,6 +2500,7 @@ public void YouTurnTrigger()
25002500
if (!isGoingStraightThrough)
25012501
mf.curve.isLateralTriggered = true;
25022502
mf.curve.isCurveValid = false;
2503+
mf.curve.lastHowManyPathsAway = 98888;
25032504
}
25042505
}
25052506
}
@@ -2601,6 +2602,7 @@ public void BuildManualYouLateral(bool isTurnLeft)
26012602

26022603
mf.ABLine.isABValid = false;
26032604
mf.curve.isCurveValid = false;
2605+
mf.curve.lastHowManyPathsAway = 98888;
26042606
}
26052607

26062608
//build the points and path of youturn to be scaled and transformed
@@ -2697,6 +2699,7 @@ public void BuildManualYouTurn(bool isTurnLeft, bool isTurnButtonTriggered)
26972699

26982700
mf.ABLine.isABValid = false;
26992701
mf.curve.isCurveValid = false;
2702+
mf.curve.lastHowManyPathsAway = 98888;
27002703
}
27012704

27022705
public int onA;

SourceCode/GPS/Forms/Controls.Designer.cs

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SourceCode/GPS/Forms/Guidance/FormABDraw.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ private void FormABDraw_FormClosing(object sender, FormClosingEventArgs e)
178178
}
179179

180180
mf.curve.isCurveValid = false;
181+
mf.curve.lastHowManyPathsAway = 98888;
181182
mf.ABLine.isABValid = false;
182183

183184
mf.twoSecondCounter = 100;

SourceCode/GPS/Forms/Guidance/FormBuildTracks.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ private void btnCancelMain_Click(object sender, EventArgs e)
144144
mf.trk.idx = originalLine;
145145

146146
mf.curve.isCurveValid = false;
147+
mf.curve.lastHowManyPathsAway = 98888;
147148
mf.ABLine.isABValid = false;
148149

149150
mf.twoSecondCounter = 100;
@@ -156,6 +157,7 @@ private void btnListUse_Click(object sender, EventArgs e)
156157
isClosing = true;
157158
//reset to generate new reference
158159
mf.curve.isCurveValid = false;
160+
mf.curve.lastHowManyPathsAway = 98888;
159161
mf.ABLine.isABValid = false;
160162
mf.curve.desList?.Clear();
161163

SourceCode/GPS/Forms/Guidance/FormGrid.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ private void FormABDraw_Load(object sender, EventArgs e)
6161
private void FormABDraw_FormClosing(object sender, FormClosingEventArgs e)
6262
{
6363
mf.curve.isCurveValid = false;
64+
mf.curve.lastHowManyPathsAway = 98888;
6465
mf.ABLine.isABValid = false;
6566

6667
mf.twoSecondCounter = 100;

SourceCode/GPS/Forms/Guidance/FormNudge.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ private void btnCycleLines_Click(object sender, EventArgs e)
8888
//reset to generate new reference
8989
mf.ABLine.isABValid = false;
9090
mf.curve.isCurveValid = false;
91+
mf.curve.lastHowManyPathsAway = 98888;
9192

9293
if (mf.isBtnAutoSteerOn) mf.btnAutoSteer.PerformClick();
9394

@@ -134,6 +135,7 @@ private void btnCycleLinesBk_Click(object sender, EventArgs e)
134135
//reset to generate new reference
135136
mf.ABLine.isABValid = false;
136137
mf.curve.isCurveValid = false;
138+
mf.curve.lastHowManyPathsAway = 98888;
137139

138140
if (mf.isBtnAutoSteerOn) mf.btnAutoSteer.PerformClick();
139141

0 commit comments

Comments
 (0)