3#include <QtCore/QMutex>
107 static QString _calTypeName(CalType calType);
108 void _finishCalibration(CalType calType);
110 void _startCalibration(CalType calType);
113 void _accelSideTick();
115 int _doneCount()
const;
119 mutable QMutex _mutex;
120 CalType _calType = CalType::None;
121 int _requestedPose = -1;
122 int _activeSide = -1;
123 int _sideTickCount = 0;
124 int _finishTickCount = -1;
125 bool _baroFails =
false;
126 bool _levelFails =
false;
127 bool _gyroFails =
false;
128 bool _inlineStalls =
false;
131 static constexpr int kTicksPerSide = 5;
132 static constexpr int kTicksToFinish = 10;
static constexpr int kSideCount
void startMagCalibration()
MockLinkPX4Calibration(MockLink *mockLink)
bool calibrationActive() const
Pose
Vehicle poses. Order matches the PX4 detect_orientation_return enum.
@ Right
"right" accel [ 0, -g, 0 ]
@ Left
"left" accel [ 0, g, 0 ]
@ NoseDown
"front" accel [ -g, 0, 0 ]
@ RightSideUp
"down" accel [ 0, 0, -g ]
@ UpsideDown
"up" accel [ 0, 0, g ]
@ TailDown
"back" accel [ g, 0, 0 ]
void startGyroCalibration(bool fails)
void startLevelCalibration(bool fails)
void startBaroCalibration(bool fails)
void run10HzTasks()
Called by MockLink::run10HzTasks on the worker thread.
void startAccelCalibration()
void setInlineCalibrationStalls(bool stalls)
Makes the simulated barometer, level horizon and gyroscope calibrations run until they are cancelled.