You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

201 lines
5.9 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __SETTINGS_LGS_DIALOG_HEADER__
  2. #define __SETTINGS_LGS_DIALOG_HEADER__
  3. #include <WinSock2.h>
  4. #include "../guiClass.h"
  5. #include "../../components/object/objectLGS.h"
  6. #include "mapControl/QMapControl"
  7. #include "mapControl/openaerialmapadapter.h"
  8. //class mainWinow;
  9. class DialogSettingsLGS : public QDialog {
  10. private:
  11. bool m_bRBlocker;
  12. basicPosition m_tPosition;
  13. bool m_bLocationByWGS84;
  14. QWidget *m_pParent;
  15. objectLGS *m_pDevice;
  16. /* GUI */
  17. bool m_bSettingsAreChanged;
  18. QPushButton *m_pButtonCmdOk;
  19. QPushButton *m_pButtonCmdCancel;
  20. QGroupBox *m_pInfoGroupBox;
  21. QGroupBox *m_pDetectionGroupBox;
  22. QGroupBox *m_pHardwareGroupBox;
  23. QGroupBox *m_pConPosGroupBox;
  24. QGroupBox *m_pPositionGroupBox;
  25. QGroupBox *m_pConmunicationGroupBox;
  26. QFrame *m_pFlagsFrame;
  27. QFrame *m_pVersionFrame;
  28. QFrame *m_pDetectFrame;
  29. QLabel *m_pInfoMaster; // SW_INFO_FLAG_MASTER
  30. QLabel *m_pInfoNoBlackTargets; // SW_INFO_NO_BLACK_TARGETS
  31. QLabel *m_pInfoEUmode; // SW_INFO_EU_PROJECT
  32. QLabel *m_pInfoTGDmotors; // SW_INFO_TGD_MOTORS
  33. QLabel *m_pInfoDebug; // SW_INFO_DEBUG_MODE
  34. QLabel *m_pInfoNoTargetLog; // SW_INFO_NO_TARGET_LOG
  35. QLabel *m_pInfoEnaHibernate; // SW_INFO_HIBERNATE_ENA
  36. QLabel *m_pInfoEnaMotorCtrl; // SW_INFO_MOTOR_CTRL_ENA
  37. QLabel *m_pInfoTGDVer2; // SW_INFO_TGD_VER_2
  38. QLabel *m_pInfoThreadFlips; // SW_INFO_THREAD_FLIP
  39. QVBoxLayout *m_pFlagsLA;
  40. QLabel *m_pBuildDate;
  41. QLabel *m_pBuildCode;
  42. QLabel *m_pPRU0Code;
  43. QLabel *m_pPRU1Code;
  44. QLabel *m_pPRU2Code;
  45. QLabel *m_pPRU3Code;
  46. QVBoxLayout *m_pVersionLA;
  47. QHBoxLayout *m_pPRU1LA;
  48. QHBoxLayout *m_pPRU2LA;
  49. QLabel *m_pFlipLabel;
  50. QSpinBox *m_pFlipSpinBox;
  51. QLabel *m_pSSTLabel;
  52. QSpinBox *m_pSSTSpinBox;
  53. QLabel *m_pOffsetLabel;
  54. QSpinBox *m_pOffsetSpinBox;
  55. QLabel *m_pOrderLabel;
  56. QSpinBox *m_pOrderSpinBox;
  57. QLabel *m_pWidthLabel;
  58. QSpinBox *m_pWidthSpinBox;
  59. QLabel *m_pGoodPointsLabel;
  60. QSpinBox *m_pGoodPointsSpinBox;
  61. QCheckBox *m_pSunBitFiltering;
  62. QSpinBox *m_pQMotorFreqSpinBox;
  63. QSpinBox *m_pBMotorFreqSpinBox;
  64. //QLabel *m_pMirrorShiftLabel;
  65. //QSpinBox *m_pMirrorShiftSpinBox;
  66. //QLabel *m_pBaseShiftLabel;
  67. //QSpinBox *m_pBaseShiftSpinBox;
  68. QFrame *m_pHWGeneralFrame;
  69. QToolButton *m_pLrfEnableToggle;
  70. QToolButton *m_pMotorsEnableToggle;
  71. QFrame *m_pHWMotorFrame;
  72. QRadioButton *m_pNoMotorCtrl;
  73. QRadioButton *m_pPwmMotorCtrl;
  74. QRadioButton *m_pTgzMotorCtrl;
  75. QFrame *m_pHWPwmFrame;
  76. QFrame *m_pHWTgzFrame;
  77. QFrame *m_pHWSeashoreFrame;
  78. QFrame *m_pHWShiftFrame;
  79. QLabel *m_pQMotorFreqLabel;
  80. QLabel *m_pBMotorFreqLabel;
  81. QPushButton *m_pButtonCmdApplyDetectionSettings;
  82. QPushButton *m_pButtonCmdFullReset;
  83. QPushButton *m_pButtonCmdOnOffMotors;
  84. QPushButton *m_pButtonCmdApplyMotorSettings;
  85. QLabel *m_pTGZ_CanBusID;
  86. QSpinBox *m_pTGZ_CanBusIDSpinBox;
  87. QLabel *m_pTGZ_CanHHID; // Host Id
  88. QSpinBox *m_pTGZ_CanHHIDSpinBox;
  89. QLabel *m_pTGZ_CanDDID; // Device Id
  90. QSpinBox *m_pTGZ_CanDDIDSpinBox;
  91. QLabel *m_pTGZ_ParamA;
  92. QSpinBox *m_pTGZ_ParamASpinBox;
  93. QLabel *m_pTGZ_ParamB;
  94. QSpinBox *m_pTGZ_ParamBSpinBox;
  95. QLabel *m_pTGZ_ParamC;
  96. QSpinBox *m_pTGZ_ParamCSpinBox;
  97. QCheckBox *m_pSeashoreCheckBox;
  98. QLineEdit *m_pSeashoreIP4Address;
  99. QLineEdit *m_pSeashoreIP4Port;
  100. QRadioButton *m_pPosByWGS84;
  101. QRadioButton *m_pPosByMeters;
  102. QDoubleSpinBox *m_pLongitude;
  103. QDoubleSpinBox *m_pLatitude;
  104. QDoubleSpinBox *m_pAltitude;
  105. QDoubleSpinBox *m_pYaw;
  106. QDoubleSpinBox *m_pRoll;
  107. QDoubleSpinBox *m_pPitch;
  108. QLabel *m_pQ_ShiftLabel;
  109. QSpinBox *m_pQ_ShiftSpinBox;
  110. QLabel *m_pB_ShiftLabel;
  111. QSpinBox *m_pB_ShiftSpinBox;
  112. QDoubleSpinBox *m_pHeading;
  113. QLabel *m_pLonLabel;
  114. QLabel *m_pLatLabel;
  115. QLabel *m_pAltLabel;
  116. QLabel *m_pYawLabel;
  117. QLabel *m_pRollLabel;
  118. QLabel *m_pPitchLabel;
  119. QPushButton *m_pButtonCmdSetToMainAnchore;
  120. QPushButton *m_pButtonCmdSetPosition;
  121. //QCheckBox *m_pConnectionCheckBox;
  122. QPushButton *m_pButtonCmdSetConnection;
  123. QLineEdit *m_pIP4Address;
  124. QLineEdit *m_pIP4Port;
  125. QPushButton *m_pButtonCmdRemoveDevice;
  126. MapControl *m_pMapControl;
  127. OSMMapAdapter *m_pMapAdapter;
  128. MapLayer *m_pMapLayer;
  129. public:
  130. explicit DialogSettingsLGS( QWidget *parent = NULL);
  131. ~DialogSettingsLGS();
  132. void updateValues();
  133. void attachDevice(objectLGS *ptr);
  134. private slots:
  135. void onPositionWGS84(void);
  136. void onPositionMeters(void);
  137. void setPositionSystemAnchor(void);
  138. public slots:
  139. void onUpdateQMotorDial( int value );
  140. void onUpdateQMotorSpinBox( int value );
  141. void onUpdateBMotorDial(int value);
  142. void onUpdateBMotorSpinBox(int value);
  143. void onMapChanged( const QPointF &coordinate, int zoom );
  144. void onBMotorControlClicked(void);
  145. void onQMotorControlClicked(void);
  146. void onPositionLonChange(double value);
  147. void onPositionLatChange(double value);
  148. void onPositionAltChange(double value);
  149. void onOrientationRollChange(double value);
  150. void onOrientationPitchChange(double value);
  151. void onOrientationYawChange(double value);
  152. void onSetPosition(void);
  153. void onSetCommunication(void);
  154. void onUpdateDevice(void);
  155. void onFullReset(void);
  156. void onRadioNoMotors(void);
  157. void onRadioPwmMotors(void);
  158. void onRadioTgzMotors(void);
  159. void onEnableBeam(void);
  160. void onEnableMotors(void);
  161. /*void connectToSelectedSource();
  162. void startDevicesDiscovery();
  163. void startAskDevice();
  164. void updateProgress();
  165. void treeItemClicked(QTreeWidgetItem *item, int column);
  166. void listItemClicked(QListWidgetItem *item);
  167. void listItemDblClicked(QListWidgetItem *item);
  168. void startPrevewNetStream(void);
  169. void useSelectedProfile(void);*/
  170. };
  171. #endif