mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +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 */
|
||||
displayInstructions("Place horizontally and click save position...", true);
|
||||
displayVisualHelp("plane-horizontal");
|
||||
showHelp("horizontal");
|
||||
disableAllCalibrations();
|
||||
savePositionEnabledChanged(true);
|
||||
position = 0;
|
||||
@ -242,23 +242,23 @@ void SixPointCalibrationModel::getSample(UAVObject *obj)
|
||||
position = (position + 1) % 6;
|
||||
if (position == 1) {
|
||||
displayInstructions("Place with left side down and click save position...", false);
|
||||
displayVisualHelp("plane-left");
|
||||
showHelp("left");
|
||||
}
|
||||
if (position == 2) {
|
||||
displayInstructions("Place upside down and click save position...", false);
|
||||
displayVisualHelp("plane-flip");
|
||||
showHelp("flip");
|
||||
}
|
||||
if (position == 3) {
|
||||
displayInstructions("Place with right side down and click save position...", false);
|
||||
displayVisualHelp("plane-right");
|
||||
showHelp("right");
|
||||
}
|
||||
if (position == 4) {
|
||||
displayInstructions("Place with nose up and click save position...", false);
|
||||
displayVisualHelp("plane-up");
|
||||
showHelp("up");
|
||||
}
|
||||
if (position == 5) {
|
||||
displayInstructions("Place with nose down and click save position...", false);
|
||||
displayVisualHelp("plane-down");
|
||||
showHelp("down");
|
||||
}
|
||||
if (position == 0) {
|
||||
compute(calibratingMag, calibratingAccel);
|
||||
@ -381,4 +381,13 @@ UAVObjectManager *SixPointCalibrationModel::getObjectManager()
|
||||
Q_ASSERT(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_y;
|
||||
QList<double> mag_accum_z;
|
||||
void showHelp(QString image);
|
||||
};
|
||||
}
|
||||
#endif // SIXPOINTCALIBRATIONMODEL_H
|
||||
|
Loading…
Reference in New Issue
Block a user