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.

199 lines
5.6 KiB

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