mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
OP-975 show board images for Accelerometer calibration.
This commit is contained in:
parent
9fb0f980f3
commit
da9aacf94f
@ -151,7 +151,7 @@ void SixPointCalibrationModel::start(bool calibrateAccel, bool calibrateMag)
|
|||||||
|
|
||||||
/* Show instructions and enable controls */
|
/* Show instructions and enable controls */
|
||||||
displayInstructions("Place horizontally and click save position...", true);
|
displayInstructions("Place horizontally and click save position...", true);
|
||||||
displayVisualHelp("plane-horizontal");
|
showHelp("horizontal");
|
||||||
disableAllCalibrations();
|
disableAllCalibrations();
|
||||||
savePositionEnabledChanged(true);
|
savePositionEnabledChanged(true);
|
||||||
position = 0;
|
position = 0;
|
||||||
@ -242,23 +242,23 @@ void SixPointCalibrationModel::getSample(UAVObject *obj)
|
|||||||
position = (position + 1) % 6;
|
position = (position + 1) % 6;
|
||||||
if (position == 1) {
|
if (position == 1) {
|
||||||
displayInstructions("Place with left side down and click save position...", false);
|
displayInstructions("Place with left side down and click save position...", false);
|
||||||
displayVisualHelp("plane-left");
|
showHelp("left");
|
||||||
}
|
}
|
||||||
if (position == 2) {
|
if (position == 2) {
|
||||||
displayInstructions("Place upside down and click save position...", false);
|
displayInstructions("Place upside down and click save position...", false);
|
||||||
displayVisualHelp("plane-flip");
|
showHelp("flip");
|
||||||
}
|
}
|
||||||
if (position == 3) {
|
if (position == 3) {
|
||||||
displayInstructions("Place with right side down and click save position...", false);
|
displayInstructions("Place with right side down and click save position...", false);
|
||||||
displayVisualHelp("plane-right");
|
showHelp("right");
|
||||||
}
|
}
|
||||||
if (position == 4) {
|
if (position == 4) {
|
||||||
displayInstructions("Place with nose up and click save position...", false);
|
displayInstructions("Place with nose up and click save position...", false);
|
||||||
displayVisualHelp("plane-up");
|
showHelp("up");
|
||||||
}
|
}
|
||||||
if (position == 5) {
|
if (position == 5) {
|
||||||
displayInstructions("Place with nose down and click save position...", false);
|
displayInstructions("Place with nose down and click save position...", false);
|
||||||
displayVisualHelp("plane-down");
|
showHelp("down");
|
||||||
}
|
}
|
||||||
if (position == 0) {
|
if (position == 0) {
|
||||||
compute(calibratingMag, calibratingAccel);
|
compute(calibratingMag, calibratingAccel);
|
||||||
@ -381,4 +381,13 @@ UAVObjectManager *SixPointCalibrationModel::getObjectManager()
|
|||||||
Q_ASSERT(objMngr);
|
Q_ASSERT(objMngr);
|
||||||
return objMngr;
|
return objMngr;
|
||||||
}
|
}
|
||||||
|
void SixPointCalibrationModel::showHelp(QString image){
|
||||||
|
|
||||||
|
if(calibratingAccel){
|
||||||
|
displayVisualHelp("revo-" + image);
|
||||||
|
}else {
|
||||||
|
displayVisualHelp("plane-" + image);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,7 @@ private:
|
|||||||
QList<double> mag_accum_x;
|
QList<double> mag_accum_x;
|
||||||
QList<double> mag_accum_y;
|
QList<double> mag_accum_y;
|
||||||
QList<double> mag_accum_z;
|
QList<double> mag_accum_z;
|
||||||
|
void showHelp(QString image);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif // SIXPOINTCALIBRATIONMODEL_H
|
#endif // SIXPOINTCALIBRATIONMODEL_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user