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)
116 void _handleTextMessage(
int sysid,
int componentid,
int severity,
const QString &text,
const QString &description);
118 void _mavCommandResult(
int vehicleId,
int component,
int command,
int result,
int failureCode);
121 void _startLogCalibration();
122 void _startVisualCalibration();
124 void _appendStatusLog(
const QString &text);
125 void _refreshParams();
126 void _hideAllCalAreas();
127 void _resetInternalState();
133 void _restorePreviousCompassCalFitness();
135 enum StopCalibrationCode {
136 StopCalibrationSuccess,
137 StopCalibrationSuccessShowLog,
138 StopCalibrationFailed,
139 StopCalibrationCancelled
141 void _stopCalibration(StopCalibrationCode code);
143 void _updateAndEmitShowOrientationCalArea(
bool show);
147 QQuickItem *_statusLog =
nullptr;
148 QQuickItem *_progressBar =
nullptr;
149 QQuickItem *_nextButton =
nullptr;
150 QQuickItem *_cancelButton =
nullptr;
151 QQuickItem *_orientationCalAreaHelpText =
nullptr;
153 bool _showOrientationCalArea =
false;
157 uint8_t _rgCompassCalProgress[3];
158 bool _rgCompassCalComplete[3];
159 bool _rgCompassCalSucceeded[3];
160 float _rgCompassCalFitness[3];
162 bool _orientationCalDownSideDone =
false;;
163 bool _orientationCalUpsideDownSideDone =
false;;
164 bool _orientationCalLeftSideDone =
false;;
165 bool _orientationCalRightSideDone =
false;;
166 bool _orientationCalNoseDownSideDone =
false;;
167 bool _orientationCalTailDownSideDone =
false;;
169 bool _orientationCalDownSideVisible =
false;;
170 bool _orientationCalUpsideDownSideVisible =
false;;
171 bool _orientationCalLeftSideVisible =
false;;
172 bool _orientationCalRightSideVisible =
false;;
173 bool _orientationCalNoseDownSideVisible =
false;;
174 bool _orientationCalTailDownSideVisible =
false;;
176 bool _orientationCalDownSideInProgress =
false;;
177 bool _orientationCalUpsideDownSideInProgress =
false;;
178 bool _orientationCalLeftSideInProgress =
false;;
179 bool _orientationCalRightSideInProgress =
false;;
180 bool _orientationCalNoseDownSideInProgress =
false;;
181 bool _orientationCalTailDownSideInProgress =
false;;
183 bool _orientationCalDownSideRotate =
false;;
184 bool _orientationCalUpsideDownSideRotate =
false;;
185 bool _orientationCalLeftSideRotate =
false;;
186 bool _orientationCalRightSideRotate =
false;;
187 bool _orientationCalNoseDownSideRotate =
false;;
188 bool _orientationCalTailDownSideRotate =
false;;
190 bool _waitingForCancel =
false;
192 bool _restoreCompassCalFitness =
false;
193 float _previousCompassCalFitness = 0.;
194 static constexpr const char *_compassCalFitnessParam =
"COMPASS_CAL_FIT";
196 static constexpr int _supportedFirmwareCalVersion = 2;