1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-1351 reviewed instructions text for all calibration steps

This commit is contained in:
Philippe Renon 2014-05-28 23:08:05 +02:00
parent 60700cab7f
commit 9cced08f82
6 changed files with 23 additions and 30 deletions

View File

@ -39,7 +39,6 @@
static const int LEVEL_SAMPLES = 100;
namespace OpenPilot {
GyroBiasCalibrationModel::GyroBiasCalibrationModel(QObject *parent) :
QObject(parent),
collectingData(false)
@ -71,7 +70,7 @@ void GyroBiasCalibrationModel::start()
attitudeSettings->updated();
displayVisualHelp(CALIBRATION_HELPER_PLANE_PREFIX + CALIBRATION_HELPER_IMAGE_NED);
displayInstructions(tr("Calibrating the gyroscopes. Keep the copter/plane steady..."), WizardModel::Notice);
displayInstructions(tr("Calibrating the gyroscopes. Keep the vehicle steady..."));
gyro_accum_x.clear();
gyro_accum_y.clear();
@ -197,7 +196,7 @@ void GyroBiasCalibrationModel::getSample(UAVObject *obj)
gyroState->setMetadata(initialGyroStateMdata);
gyroSensor->setMetadata(initialGyroSensorMdata);
displayInstructions(tr("Gyroscope calibration completed succesfully."));
displayInstructions(tr("Gyroscope calibration completed succesfully."), WizardModel::Success);
displayVisualHelp(CALIBRATION_HELPER_IMAGE_EMPTY);
// Recall saved board rotation

View File

@ -37,7 +37,6 @@
#include <QObject>
namespace OpenPilot {
class GyroBiasCalibrationModel : public QObject {
Q_OBJECT

View File

@ -34,7 +34,6 @@
static const int LEVEL_SAMPLES = 100;
namespace OpenPilot {
LevelCalibrationModel::LevelCalibrationModel(QObject *parent) :
QObject(parent)
{}
@ -62,8 +61,8 @@ void LevelCalibrationModel::start()
mdata.flightTelemetryUpdatePeriod = 100;
attitudeState->setMetadata(mdata);
/* Show instructions and enable controls */
displayInstructions(tr("Place horizontally and click Save Position button..."), WizardModel::Info);
// Show instructions and enable controls
displayInstructions(tr("Place horizontally and press Save Position..."), WizardModel::Prompt);
displayVisualHelp(CALIBRATION_HELPER_PLANE_PREFIX + CALIBRATION_HELPER_IMAGE_NED);
savePositionEnabledChanged(true);
position = 0;
@ -130,7 +129,7 @@ void LevelCalibrationModel::getSample(UAVObject *obj)
rot_data_pitch = OpenPilot::CalibrationUtils::listMean(rot_accum_pitch);
rot_data_roll = OpenPilot::CalibrationUtils::listMean(rot_accum_roll);
displayInstructions(tr("Leave horizontally, rotate 180° along yaw axis and click Save Position button..."));
displayInstructions(tr("Leave horizontally, rotate 180° along yaw axis and press Save Position..."), WizardModel::Prompt);
displayVisualHelp(CALIBRATION_HELPER_PLANE_PREFIX + CALIBRATION_HELPER_IMAGE_SWD);
savePositionEnabledChanged(true);
@ -143,7 +142,7 @@ void LevelCalibrationModel::getSample(UAVObject *obj)
attitudeState->setMetadata(initialAttitudeStateMdata);
compute();
displayVisualHelp(CALIBRATION_HELPER_IMAGE_EMPTY);
displayInstructions(tr("Board leveling completed successfully."));
displayInstructions(tr("Board leveling completed successfully."), WizardModel::Success);
break;
}
}
@ -174,5 +173,4 @@ UAVObjectManager *LevelCalibrationModel::getObjectManager()
Q_ASSERT(objMngr);
return objMngr;
}
}

View File

@ -41,7 +41,6 @@
#include <QList>
namespace OpenPilot {
class LevelCalibrationModel : public QObject {
Q_OBJECT

View File

@ -41,7 +41,6 @@
#define FITTING_USING_CONTINOUS_ACQUISITION
namespace OpenPilot {
SixPointCalibrationModel::SixPointCalibrationModel(QObject *parent) :
QObject(parent),
calibrationStepsMag(),
@ -55,31 +54,31 @@ SixPointCalibrationModel::SixPointCalibrationModel(QObject *parent) :
calibrationStepsMag.clear();
calibrationStepsMag
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_NED,
tr("Place horizontally, nose pointing north and click Save Position button..."))
tr("Place horizontally, nose pointing north and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_DWN,
tr("Place with nose down, right side west and click Save Position button..."))
tr("Place with nose down, right side west and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_WDS,
tr("Place right side down, nose west and click Save Position button..."))
tr("Place right side down, nose west and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_ENU,
tr("Place upside down, nose east and click Save Position button..."))
tr("Place upside down, nose east and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_USE,
tr("Place with nose up, left side north and click Save Position button..."))
tr("Place with nose up, left side north and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_SUW,
tr("Place with left side down, nose south and click Save Position button..."));
tr("Place with left side down, nose south and press Save Position..."));
calibrationStepsAccelOnly.clear();
calibrationStepsAccelOnly << CalibrationStep(CALIBRATION_HELPER_IMAGE_NED,
tr("Place horizontally and click Save Position button..."))
tr("Place horizontally and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_DWN,
tr("Place with nose down and click Save Position button..."))
tr("Place with nose down and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_WDS,
tr("Place right side down and click Save Position button..."))
tr("Place right side down and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_ENU,
tr("Place upside down and click Save Position button..."))
tr("Place upside down and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_USE,
tr("Place with nose up and click Save Position button..."))
tr("Place with nose up and press Save Position..."))
<< CalibrationStep(CALIBRATION_HELPER_IMAGE_SUW,
tr("Place with left side down and click Save Position button..."));
tr("Place with left side down and press Save Position..."));
}
/********** Six point calibration **************/
@ -201,7 +200,7 @@ void SixPointCalibrationModel::start(bool calibrateAccel, bool calibrateMag)
started();
// Show instructions and enable controls
displayInstructions((*currentSteps)[0].instructions, WizardModel::Info);
displayInstructions((*currentSteps)[0].instructions, WizardModel::Prompt);
showHelp((*currentSteps)[0].visualHelp);
savePositionEnabledChanged(true);
position = 0;
@ -212,7 +211,7 @@ void SixPointCalibrationModel::start(bool calibrateAccel, bool calibrateMag)
/**
* Saves the data from the aircraft in one of six positions.
* This is called when they click "save position" and starts
* This is called when they press "save position" and starts
* averaging data for this position.
*/
void SixPointCalibrationModel::savePositionData()
@ -314,7 +313,7 @@ void SixPointCalibrationModel::getSample(UAVObject *obj)
position = (position + 1) % 6;
if (position != 0) {
displayInstructions((*currentSteps)[position].instructions);
displayInstructions((*currentSteps)[position].instructions, WizardModel::Prompt);
showHelp((*currentSteps)[position].visualHelp);
} else {
#ifdef FITTING_USING_CONTINOUS_ACQUISITION
@ -488,9 +487,9 @@ void SixPointCalibrationModel::compute(bool mag, bool accel)
} else {
accelGyroSettings->setData(savedSettings.accelGyroSettings);
}
displayInstructions(tr("Sensor scale and bias computed succesfully."));
displayInstructions(tr("Sensor scale and bias computed succesfully."), WizardModel::Success);
} else {
displayInstructions(tr("Bad calibration. Please review the instructions and repeat."), WizardModel::Error);
displayInstructions(tr("Bad calibration. Please review the instructions and repeat."), WizardModel::Failure);
}
// set to run again
position = -1;

View File

@ -42,7 +42,6 @@
#include <QString>
namespace OpenPilot {
class SixPointCalibrationModel : public QObject {
Q_OBJECT