diff --git a/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp b/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp index e4a117334..28ddcb2d0 100644 --- a/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp +++ b/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp @@ -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); + } +} + } diff --git a/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.h b/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.h index 6d4f8e5e2..21d19536e 100644 --- a/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.h +++ b/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.h @@ -94,6 +94,7 @@ private: QList mag_accum_x; QList mag_accum_y; QList mag_accum_z; + void showHelp(QString image); }; } #endif // SIXPOINTCALIBRATIONMODEL_H