-
Notifications
You must be signed in to change notification settings - Fork 22
/
formgps.h
823 lines (641 loc) · 22.6 KB
/
formgps.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
#ifndef FORMGPS_H
#define FORMGPS_H
#include <QMainWindow>
#include <QScopedPointer>
#include <QtQuick/QQuickItem>
#include <QOpenGLFunctions>
#include <QOpenGLTexture>
#include <QUdpSocket>
#include <QElapsedTimer>
#include <QOffscreenSurface>
#include <QOpenGLContext>
#include <QSurfaceFormat>
#include <QOpenGLFramebufferObject>
#include <QOpenGLBuffer>
#include <QQmlApplicationEngine>
//#include <QSerialPort>
#include "common.h"
#include "vecfix2fix.h"
#include "vec2.h"
#include "vec3.h"
#include "cflag.h"
#include "cmodulecomm.h"
#include "ccamera.h"
#include "btnenum.h"
#include "cworldgrid.h"
#include "cnmea.h"
#include "cvehicle.h"
#include "ctool.h"
#include "cboundary.h"
#include "cabline.h"
#include "ctram.h"
#include "ccontour.h"
#include "cabcurve.h"
#include "cyouturn.h"
#include "cfielddata.h"
#include "csim.h"
#include "cahrs.h"
#include "crecordedpath.h"
#include "cguidance.h"
#include "cheadline.h"
#include "cpgn.h"
#include "formheadland.h"
#include "formheadache.h"
//forward declare classes referred to below, to break circular
//references in the code
class QOpenGLShaderProgram;
class AOGRendererInSG;
class QQuickCloseEvent;
class QVector3D;
class FormGPS : public QQmlApplicationEngine
{
Q_OBJECT
public:
explicit FormGPS(QWidget *parent = 0);
~FormGPS();
/***********************************************
* Qt-specific things we need to keep track of *
***********************************************/
QLocale locale;
QObject *qml_root;
QSignalMapper *sectionButtonsSignalMapper;
QTimer *tmrWatchdog;
QTimer timerSim;
/***************************
* Qt and QML GUI elements *
***************************/
//QQuickView *qmlview;
QWidget *qmlcontainer;
AOGRendererInSG *openGLControl;
//Left Menu & children
QObject *btnAcres;
QObject *btnSettings;
QObject *btnTools;
QObject *btnFieldMenu;
QObject *btnAgIO;
QObject *btnautoSteerConf;
QObject *btnAutoSteerMode;
QObject *btnTiltDown;
QObject *btnTiltUp;
QObject *btnZoomIn;
QObject *btnZoomOut;
//right menu & children
QObject *btnContour;
QObject *btnCurve;
QObject *btnABLine;
QObject *btnABLineCycle;
QObject *btnABLineCycleBk;
QObject *btnManualOffOn;
QObject *btnSectionOffAutoOn;
QObject *btnAutoSteer;
QObject *btnContourPriority;
//other
QObject *btnFlag;
//flag context menu and buttons
QObject *contextFlag;
QObject *btnDeleteFlag;
QObject *btnDeleteAllFlags;
//section buttons
QObject *sectionButton[MAXSECTIONS-1]; //zero based array
QObject *txtDistanceOffABLine;
//offscreen GL objects:
QSurfaceFormat backSurfaceFormat;
QOpenGLContext backOpenGLContext;
QOffscreenSurface backSurface;
QOpenGLFramebufferObject *backFBO = 0;
/*******************
* from FormGPS.cs *
*******************/
//The base directory where AgOpenGPS will be stored and fields and vehicles branch from
QString baseDirectory;
//current directory of vehicle
QString vehiclesDirectory, vehicleFileName = "";
//current directory of tools
QString toolsDirectory, toolFileName = "";
//current directory of Environments
QString envDirectory, envFileName = "";
//current fields and field directory
QString fieldsDirectory, currentFieldDirectory, displayFieldName;
bool leftMouseDownOnOpenGL; //mousedown event in opengl window
int flagNumberPicked = 0;
//bool for whether or not a job is active
bool /*isJobStarted = false,*/ isAreaOnRight = true /*, isAutoSteerBtnOn = false*/;
//this bool actually lives in the QML aog object.
InterfaceProperty<AOGInterface,bool> isJobStarted = InterfaceProperty<AOGInterface,bool>("isJobStarted");
InterfaceProperty<AOGInterface,bool> isAutoSteerBtnOn = InterfaceProperty<AOGInterface,bool>("isAutoSteerBtnOn");
//if we are saving a file
bool isSavingFile = false, isLogElevation = false;
//the currentversion of software
QString currentVersionStr, inoVersionStr;
int inoVersionInt;
//create instance of a stopwatch for timing of frames and NMEA hz determination
QElapsedTimer swFrame;
double secondsSinceStart;
//Time to do fix position update and draw routine
double frameTime = 0;
//Time to do fix position update and draw routine
double gpsHz = 10;
bool isStanleyUsed = false;
int pbarSteer, pbarRelay, pbarUDP;
double nudNumber = 0;
double m2InchOrCm, inchOrCm2m, m2FtOrM, ftOrMtoM, cm2CmOrIn, inOrCm2Cm;
QString unitsFtM, unitsInCm;
//used by filePicker Form to return picked file and directory
//QString filePickerFileAndDirectory;
//the position of the GPS Data window within the FormGPS window
//int GPSDataWindowLeft = 76, GPSDataWindowTopOffset = 220;
//the autoManual drive button. Assume in Auto
bool isInAutoDrive = true;
//isGPSData form up
bool isGPSSentencesOn = false, isKeepOffsetsOn = false;
private:
//For field saving in background
int minuteCounter = 1;
int tenMinuteCounter = 1;
//used to update the screen status bar etc
int displayUpdateHalfSecondCounter = 0, displayUpdateOneSecondCounter = 0, displayUpdateOneFifthCounter = 0, displayUpdateThreeSecondCounter = 0;
int tenSecondCounter = 0, tenSeconds = 0;
int threeSecondCounter = 0, threeSeconds = 0;
int oneSecondCounter = 0, oneSecond = 0;
int oneHalfSecondCounter = 0, oneHalfSecond = 0;
int oneFifthSecondCounter = 0, oneFifthSecond = 0;
/*******************
* GUI.Designer.cs *
*******************/
public:
//ABLines directory
QString ablinesdirectory;
//colors for sections and field background
uchar flagColor = 0;
//how many cm off line per big pixel
int lightbarCmPerPixel = 2;
//polygon mode for section drawing
bool isDrawPolygons = false;
QColor frameDayColor;
QColor frameNightColor;
QColor sectionColorDay;
QColor fieldColorDay;
QColor fieldColorNight;
QColor textColorDay;
QColor textColorNight;
QColor vehicleColor;
double vehicleOpacity;
uchar vehicleOpacityByte;
bool isVehicleImage;
//Is it in 2D or 3D, metric or imperial, display lightbar, display grid etc
bool isMetric = true, isLightbarOn = true, isGridOn, isFullScreen;
bool isUTurnAlwaysOn, isCompassOn, isSpeedoOn, isSideGuideLines = true;
bool isPureDisplayOn = true, isSkyOn = true, isRollMeterOn = false, isTextureOn = true;
bool isDay = true, isDayTime = true, isBrightnessOn = true;
bool isKeyboardOn = true, isAutoStartAgIO = true, isSvennArrowOn = true;
bool isUTurnOn = true, isLateralOn = true;
//sunrise, sunset
bool isFlashOnOff = false;
//makes nav panel disappear after 6 seconds
int navPanelCounter = 0;
InterfaceProperty<AOGInterface,uint> sentenceCounter = InterfaceProperty<AOGInterface,uint>("sentenceCounter");
bool hydLiftDown = false;
//master Manual and Auto, 3 states possible
//btnStates manualBtnState = btnStates::Off;
//btnStates autoBtnState = btnStates::Off;
InterfaceProperty<AOGInterface,btnStates> manualBtnState = InterfaceProperty<AOGInterface,btnStates>("manualBtnState");
InterfaceProperty<AOGInterface,btnStates> autoBtnState = InterfaceProperty<AOGInterface,btnStates>("autoBtnState");
private:
public:
//for animated submenu
//bool isMenuHid = true;
//Zoom variables
double gridZoom;
double zoomValue = 10;
double triangleResolution = 1.0;
double previousZoom = 25;
// Storage For Our Tractor, implement, background etc Textures
//Texture particleTexture;
QElapsedTimer stopwatch; //general stopwatch for debugging purposes.
//readonly Stopwatch swFrame = new Stopwatch();
//Time to do fix position update and draw routine
double HzTime = 5;
QVector<CPatches> triStrip = QVector<CPatches>( { CPatches() } );
//used to update the screen status bar etc
int statusUpdateCounter = 1;
//create the scene camera
CCamera camera;
//create world grid
//QScopedPointer <CWorldGrid> worldGrid;
CWorldGrid worldGrid;
//Parsing object of NMEA sentences
//QScopedPointer<CNMEA> pn;
CNMEA pn;
//ABLine Instance
//QScopedPointer<CABLine> ABLine;
CABLine ABLine;
CABCurve curve;
CGuidance gyd;
CTram tram;
//Contour mode Instance
//QScopedPointer<CContour> ct;
CContour ct;
CYouTurn yt;
CVehicle vehicle;
CTool tool;
//module communication object
CModuleComm mc;
//boundary instance
CBoundary bnd;
CSim sim;
CAHRS ahrs;
CRecordedPath recPath;
CFieldData fd;
CHeadLine hdl;
FormHeadland headland_form;
FormHeadache headache_form;
/*
* PGNs *
*/
CPGN_FE p_254;
CPGN_FC p_252;
CPGN_FB p_251;
CPGN_EF p_239;
CPGN_EE p_238;
CPGN_EC p_236;
CPGN_EB p_235;
CPGN_E5 p_229;
/* GUI synchronization lock */
QReadWriteLock lock;
bool newframe = false;
bool bootstrap_field = false;
/************************
* Controls.Designer.cs *
************************/
public:
bool isTT;
bool isABCyled = false;
void GetHeadland();
void CloseTopMosts();
void SnapToPivot();
void getAB();
void FixTramModeButton();
//other things will be in slots
/*************************
* Position.designer.cs *
*************************/
public:
//very first fix to setup grid etc
bool isFirstFixPositionSet = false, isGPSPositionInitialized = false, isFirstHeadingSet = false;
bool /*isReverse = false (CVehicle),*/ isSteerInReverse = true, isSuperSlow = false, isAutoSnaptoPivot = false;
double startGPSHeading = 0;
//string to record fixes for elevation maps
QByteArray sbFix;
// autosteer variables for sending serial moved to CVehicle
//short guidanceLineDistanceOff, guidanceLineSteerAngle; --> CVehicle
double avGuidanceSteerAngle;
short errorAngVel;
double setAngVel, actAngVel;
bool isConstantContourOn;
//guidance line look ahead
double guidanceLookAheadTime = 2;
Vec2 guidanceLookPos;
//for heading or Atan2 as camera
QString headingFromSource, headingFromSourceBak;
/* moved to CVehicle:
Vec3 pivotAxlePos;
Vec3 steerAxlePos;
Vec3 toolPos;
Vec3 tankPos;
Vec3 hitchPos;
*/
//history
Vec2 prevFix;
Vec2 prevDistFix;
Vec2 lastReverseFix;
//headings
double smoothCamHeading = 0, gpsHeading = 10.0, prevGPSHeading = 0.0;
//storage for the cos and sin of heading
//moved to vehicle
//double cosSectionHeading = 1.0, sinSectionHeading = 0.0;
//how far travelled since last section was added, section points
double sectionTriggerDistance = 0, contourTriggerDistance = 0, sectionTriggerStepDistance = 0;
Vec2 prevSectionPos;
Vec2 prevContourPos;
int patchCounter = 0;
Vec2 prevBoundaryPos;
//Everything is so wonky at the start
int startCounter = 0;
//individual points for the flags in a list
QVector<CFlag> flagPts;
bool flagsBufferCurrent = false;
//tally counters for display
//public double totalSquareMetersWorked = 0, totalUserSquareMeters = 0, userSquareMetersAlarm = 0;
double /*avgSpeed --> CVehicle,*/ previousSpeed;//for average speed
double crossTrackError; //for average cross track error
//youturn
double distancePivotToTurnLine = -2222;
double distanceToolToTurnLine = -2222;
//the value to fill in you turn progress bar
int youTurnProgressBar = 0;
//IMU
double rollCorrectionDistance = 0;
double imuGPS_Offset, imuCorrected;
//step position - slow speed spinner killer
int currentStepFix = 0;
int totalFixSteps = 10;
VecFix2Fix stepFixPts[10];
double distanceCurrentStepFix = 0, distanceCurrentStepFixDisplay = 0, minHeadingStepDist = 1, startSpeed = 0.5;
double fixToFixHeadingDistance = 0, gpsMinimumStepDistance = 0.05;
bool isChangingDirection, isReverseWithIMU;
double nowHz = 0, filteredDelta = 0, delta = 0;
bool isRTK, isRTK_KillAutosteer;
double headlandDistanceDelta = 0, boundaryDistanceDelta = 0;
Vec2 lastGPS;
double uncorrectedEastingGraph = 0;
double correctionDistanceGraph = 0;
double frameTimeRough = 3;
double timeSliceOfLastFix = 0;
bool isMaxAngularVelocity = false;
int minSteerSpeedTimer = 0;
InterfaceProperty<BoundaryInterface,bool> isOutOfBounds = InterfaceProperty<BoundaryInterface,bool>("isOutOfBounds");
void UpdateFixPosition(); //process a new position
void TheRest();
void CalculatePositionHeading(); // compute all headings and fixes
void AddBoundaryPoint();
void AddContourPoints();
void AddSectionOrPathPoints();
void CalculateSectionLookAhead(double northing, double easting, double cosHeading, double sinHeading);
void InitializeFirstFewGPSPositions();
/************************
* SaveOpen.Designer.cs *
************************/
//moved to CTool
//list of the list of patch data individual triangles for field sections
//QVector<QSharedPointer<QVector<QVector3D>>> patchSaveList;
//moved to CContour.
//list of the list of patch data individual triangles for contour tracking
QVector<QSharedPointer<QVector<Vec3>>> contourSaveList;
void FileSaveHeadLines();
void FileLoadHeadLines();
void FileSaveCurveLines();
void FileLoadCurveLines();
void FileSaveABLines();
void FileLoadABLines();
bool FileOpenField(QString fieldDir, int flags = -1);
QMap<QString, QVariant> FileFieldInfo(QString fieldDir);
void FileCreateField();
void FileCreateElevation();
void FileSaveSections();
void FileCreateSections();
void FileCreateFlags();
void FileCreateContour();
void FileSaveContour();
void FileCreateBoundary();
void FileSaveBoundary();
void FileSaveTram();
void FileSaveBackPic();
void FileCreateRecPath();
void FileSaveHeadland();
void FileSaveRecPath();
void FileLoadRecPath();
void FileSaveFlags();
void FileSaveNMEA();
void FileSaveElevation();
void FileSaveSingleFlagKML2(int flagNumber);
void FileSaveSingleFlagKML(int flagNumber);
void FileMakeKMLFromCurrentPosition(double lat, double lon);
void ExportFieldAs_KML();
void FileUpdateAllFieldsKML();
QString GetBoundaryPointsLatLon(int bndNum);
void ExportFieldAs_ISOXMLv3();
void ExportFieldAs_ISOXMLv4();
/************************
* formgps_sections.cpp *
************************/
//void SectionSetPosition();
//void SectionCalcWidths();
//void SectionCalcMulti();
void BuildMachineByte();
void DoRemoteSwitches();
/************************
* formgps_settimgs.cpp *
************************/
void loadSettings();
/**********************
* OpenGL.Designer.cs *
**********************/
//extracted Near, Far, Right, Left clipping planes of frustum
double frustum[24];
double fovy = 0.7;
double camDistanceFactor = -2;
int mouseX = 0, mouseY = 0;
double mouseEasting = 0, mouseNorthing = 0;
int lastWidth=-1, lastHeight=-1;
double maxFieldX, maxFieldY, minFieldX, minFieldY, fieldCenterX, fieldCenterY, maxFieldDistance;
double offX = 0.0, offY = 0.0;
//data buffer for pixels read from off screen buffer
//uchar grnPixels[80001];
LookAheadPixels grnPixels[150001];
QImage grnPix;
/*
QOpenGLShaderProgram *simpleColorShader = 0;
QOpenGLShaderProgram *texShader = 0;
QOpenGLShaderProgram *interpColorShader = 0;
*/
QOpenGLBuffer skyBuffer;
QOpenGLBuffer flagsBuffer;
/***********************
* formgps_udpcomm.cpp *
***********************/
private:
QUdpSocket *udpSocket = NULL;
public:
QElapsedTimer udpWatch;
int udpWatchLimit = 70;
int udpWatchCounts = 0;
bool isUDPServerOn = false;
void StartLoopbackServer();
void stopUDPServer();
void SendPgnToLoop(QByteArray byteData);
void DisableSim();
//void ReceiveFromAgIO(); // in slots below
/******************
* formgps_ui.cpp *
******************/
//or should be under formgps_settings.cpp?
/**********************
* OpenGL.Designer.cs *
**********************/
ulong number = 0, lastNumber = 0;
bool isHeadlandClose = false;
int steerModuleConnectedCounter = 0;
double avgPivDistance=0, lightbarDistance=0;
QString strHeading;
int lenth = 4;
void DrawUTurnBtn(QOpenGLFunctions *gl, QMatrix4x4 mvp);
void MakeFlagMark(QOpenGLFunctions *gl);
void DrawFlags(QOpenGLFunctions *gl, QMatrix4x4 mvp);
void DrawSky(QOpenGLFunctions *gl, QMatrix4x4 mvp, int width, int height);
void DrawCompassText(QOpenGLFunctions *gl, QMatrix4x4 mvp, double Width, double Height);
void DrawCompass(QOpenGLFunctions *gl, QMatrix4x4 modelview, QMatrix4x4 projection, double Width);
void DrawLiftIndicator(QOpenGLFunctions *gl, QMatrix4x4 modelview, QMatrix4x4 projection, int Width, int Height);
void DrawLostRTK(QOpenGLFunctions *gl, QMatrix4x4 mvp, double Width);
void DrawAge(QOpenGLFunctions *gl, QMatrix4x4 mvp, double Width);
void CalcFrustum(const QMatrix4x4 &mvp);
void calculateMinMax();
QVector3D mouseClickToField(int mouseX, int mouseY);
QVector3D mouseClickToPan(int mouseX, int mouseY);
void SetZoom();
void loadGLTextures();
private:
void setupGui();
/**************
* FormGPS.cs *
**************/
public:
QString speedMPH();
QString speedKPH();
void JobNew();
void JobClose();
/******************************
* formgps_classcallbacks.cpp *
******************************/
void connect_classes();
/****************
* form_sim.cpp *
****************/
void simConnectSlots();
/**************************
* UI/Qt object callbacks *
**************************/
public slots:
/*******************
* from FormGPS.cs *
*******************/
void tmrWatchdog_timeout();
void processSectionLookahead(); //called when section lookahead GL stuff is rendered
void TimedMessageBox(int timeout, QString s1, QString s2);
//AB Lines in GUI. TODO: rename these, make them consistent
void update_ABlines_in_qml();
void update_current_ABline_from_qml();
void add_new_ABline(QString name, double easting, double northing,double heading);
void start_newABLine(bool start_or_cancel, double easting, double northing, double heading);
void delete_ABLine(int which_line);
void swap_heading_ABLine(int which_line);
void change_name_ABLine(int which_line, QString name);
//settings dialog callbacks
void on_settings_reload();
void on_settings_save();
//vehicle callbacks
void vehicle_saveas(QString vehicle_name);
//void vehicle_load(int index);
void vehicle_load(QString vehicle_name);
void vehicle_delete(QString vehicle_name);
void vehicle_update_list();
//field callbacks
void field_update_list();
void field_close();
void field_open(QString field_name);
void field_new(QString field_name);
void field_new_from(QString existing, QString field_name, int flags);
void field_delete(QString field_name);
//modules ui callback
void modules_send_238();
void modules_send_251();
//boundary UI for recording new boundary
void boundary_calculate_area();
void boundary_update_list();
void boundary_start();
void boundary_stop();
void boundary_add_point();
void boundary_delete_last_point();
void boundary_pause();
void boundary_record();
void boundary_restart();
void boundary_delete(int which_boundary);
void boundary_set_drivethru(int which_boundary, bool drive_through);
void boundary_delete_all();
void headland_save();
void headlines_save();
void headlines_load();
//headland creation
void onBtnResetDirection_clicked();
//left column
void onBtnAcres_clicked();
void onBtnSettings_clicked();
void onBtnAgIO_clicked();
void onBtnSteerConfig_clicked();
void onBtnSteerMode_clicked();
//right column
void onBtnContour_clicked();
void onBtnToggleAB_clicked();
void onBtnToggleABBack_clicked();
void onBtnAutoYouTurn_clicked();
void onBtnSwapAutoYouTurnDirection_clicked();
void onBtnContourPriority_clicked();
//bottom row
void onBtnResetTool_clicked();
void onBtnHeadland_clicked();
void onBtnHydLift_clicked();
void onBtnFlag_clicked();
void onBtnTramlines_clicked();
void onBtnSectionColor_clicked();
void onBtnLinePicker_clicked();
void onBtnSnapToPivot_clicked();
//don't need ablineedit
void onBtnYouSkip_clicked();
//displaybuttons.qml
void onBtnTiltDown_clicked();
void onBtnTiltUp_clicked();
void onBtn2D_clicked();
void onBtn3D_clicked();
void onBtnN2D_clicked();
void onBtnN3D_clicked();
void onBtnZoomIn_clicked();
void onBtnZoomOut_clicked();
void onBtnRedFlag_clicked();
void onBtnGreenFlag_clicked();
void onBtnYellowFlag_clicked();
void onBtnDeleteFlag_clicked();
void onBtnDeleteAllFlags_clicked();
void swapDirection();
void turnOffBoundAlarm();
void onBtnManUTurn_clicked(bool right); //TODO add the skip number as a parameter
void onBtnLateral_clicked(bool right); //TODO add the skip number as a parameter
void onBtnResetSim_clicked();
void onBtnCenterOgl_clicked();
/***************************
* from OpenGL.Designer.cs *
***************************/
void oglMain_Paint();
void openGLControl_Initialized();
void openGLControl_Shutdown();
//void openGLControl_Resize();
void onGLControl_clicked(const QVariant &event);
void onGLControl_dragged(int startX, int startY, int mouseX, int mouseY);
void oglBack_Paint();
void openGLControlBack_Initialized();
/***
* UDPCOMM.Designer.cs
* formgps_udpcomm.cpp
***/
void ReceiveFromAgIO(); // in slots below
/*******************
* simulator *
* formgps_sim.cpp *
*******************/
void onSimNewPosition(double vtgSpeed,
double headingTrue,
double latitude,
double longitude, double hdop,
double altitude,
double satellitesTracked);
void onSimNewSteerAngle(double steerAngleAve);
void onSimTimerTimeout();
/*
* misc
*/
void fileSaveEverythingBeforeClosingField();
/* formgps_classcallbacks.cpp */
void onStopAutoSteer(); //cancel autosteer and ensure button state
void onSectionMasterAutoOff();
void onSectionMasterManualOff();
void onStoppedDriving();
};
#endif // FORMGPS_H