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.

203 lines
5.8 KiB

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