20 Q_PROPERTY(QQuickItem* statusLog MEMBER _statusLog)
21 Q_PROPERTY(QQuickItem* progressBar MEMBER _progressBar)
23 Q_PROPERTY(QQuickItem* nextButton MEMBER _nextButton)
24 Q_PROPERTY(QQuickItem* cancelButton MEMBER _cancelButton)
25 Q_PROPERTY(QQuickItem* orientationCalAreaHelpText MEMBER _orientationCalAreaHelpText)
121 void _handleTextMessage(
int sysid,
int componentid,
int severity,
const QString &text,
const QString &description);
123 void _mavCommandResult(
int vehicleId,
int component,
int command,
int result,
int failureCode);
126 void _startLogCalibration();
127 void _startVisualCalibration();
129 void _appendStatusLog(
const QString &text);
130 void _refreshParams();
131 void _hideAllCalAreas();
132 void _resetInternalState();
138 void _restorePreviousCompassCalFitness();
140 enum StopCalibrationCode {
141 StopCalibrationSuccess,
142 StopCalibrationSuccessShowLog,
143 StopCalibrationFailed,
144 StopCalibrationCancelled
146 void _stopCalibration(StopCalibrationCode code);
148 void _updateAndEmitShowOrientationCalArea(
bool show);
152 QQuickItem *_statusLog =
nullptr;
153 QQuickItem *_progressBar =
nullptr;
154 QQuickItem *_nextButton =
nullptr;
155 QQuickItem *_cancelButton =
nullptr;
156 QQuickItem *_orientationCalAreaHelpText =
nullptr;
158 bool _showOrientationCalArea =
false;
162 uint8_t _rgCompassCalProgress[3];
163 bool _rgCompassCalComplete[3];
164 bool _rgCompassCalSucceeded[3];
165 float _rgCompassCalFitness[3];
167 bool _orientationCalDownSideDone =
false;;
168 bool _orientationCalUpsideDownSideDone =
false;;
169 bool _orientationCalLeftSideDone =
false;;
170 bool _orientationCalRightSideDone =
false;;
171 bool _orientationCalNoseDownSideDone =
false;;
172 bool _orientationCalTailDownSideDone =
false;;
174 bool _orientationCalDownSideVisible =
false;;
175 bool _orientationCalUpsideDownSideVisible =
false;;
176 bool _orientationCalLeftSideVisible =
false;;
177 bool _orientationCalRightSideVisible =
false;;
178 bool _orientationCalNoseDownSideVisible =
false;;
179 bool _orientationCalTailDownSideVisible =
false;;
181 bool _orientationCalDownSideInProgress =
false;;
182 bool _orientationCalUpsideDownSideInProgress =
false;;
183 bool _orientationCalLeftSideInProgress =
false;;
184 bool _orientationCalRightSideInProgress =
false;;
185 bool _orientationCalNoseDownSideInProgress =
false;;
186 bool _orientationCalTailDownSideInProgress =
false;;
188 bool _orientationCalDownSideRotate =
false;;
189 bool _orientationCalUpsideDownSideRotate =
false;;
190 bool _orientationCalLeftSideRotate =
false;;
191 bool _orientationCalRightSideRotate =
false;;
192 bool _orientationCalNoseDownSideRotate =
false;;
193 bool _orientationCalTailDownSideRotate =
false;;
195 bool _waitingForCancel =
false;
197 bool _restoreCompassCalFitness =
false;
198 float _previousCompassCalFitness = 0.;
199 static constexpr const char *_compassCalFitnessParam =
"COMPASS_CAL_FIT";
201 static constexpr int _supportedFirmwareCalVersion = 2;