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.

197 lines
5.7 KiB

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