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

OP-975 fix some text, make it translatable

This commit is contained in:
Alessio Morale 2014-04-27 12:59:39 +02:00
parent bb35a8fc97
commit a00b633972
3 changed files with 16 additions and 15 deletions

View File

@ -68,7 +68,7 @@ void GyroBiasCalibrationModel::start()
attitudeSettings->setData(attitudeSettingsData);
attitudeSettings->updated();
displayVisualHelp(CALIBRATION_HELPER_PLANE_PREFIX + CALIBRATION_HELPER_IMAGE_NED);
displayInstructions("Calibrating the gyroscopes. Keep the copter/plane steady...", true);
displayInstructions(tr("Calibrating the gyroscopes. Keep the copter/plane steady..."), true);
gyro_accum_x.clear();
gyro_accum_y.clear();
@ -158,8 +158,9 @@ void GyroBiasCalibrationModel::getSample(UAVObject *obj)
gyroState->setMetadata(initialGyroStateMdata);
displayInstructions("Calibration done!", false);
displayInstructions(tr("Gyroscope calibration computed succesfully."), false);
displayVisualHelp(CALIBRATION_HELPER_IMAGE_EMPTY);
// Recall saved board rotation
recallBoardRotation();
}

View File

@ -62,7 +62,7 @@ void LevelCalibrationModel::start()
attitudeState->setMetadata(mdata);
/* Show instructions and enable controls */
displayInstructions("Place horizontally and click save position...", true);
displayInstructions(tr("Place horizontally and click save position..."), true);
displayVisualHelp(CALIBRATION_HELPER_PLANE_PREFIX + CALIBRATION_HELPER_IMAGE_NED);
disableAllCalibrations();
savePositionEnabledChanged(true);
@ -86,7 +86,7 @@ void LevelCalibrationModel::savePosition()
Q_ASSERT(attitudeState);
connect(attitudeState, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(getSample(UAVObject *)));
displayInstructions("Hold...",false);
displayInstructions(tr("Hold..."), false);
}
/**
@ -130,7 +130,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("Leave horizontally, rotate 180° along yaw axis and click save position...", true);
displayInstructions(tr("Leave horizontally, rotate 180° along yaw axis and click save position..."), false);
displayVisualHelp(CALIBRATION_HELPER_PLANE_PREFIX + CALIBRATION_HELPER_IMAGE_SWD);
disableAllCalibrations();
@ -146,6 +146,7 @@ void LevelCalibrationModel::getSample(UAVObject *obj)
compute();
enableAllCalibrations();
displayVisualHelp(CALIBRATION_HELPER_IMAGE_EMPTY);
displayInstructions(tr("Board leveling computed successfully."), false);
break;
}
}

View File

@ -151,7 +151,7 @@ void SixPointCalibrationModel::start(bool calibrateAccel, bool calibrateMag)
mag->setMetadata(mdata);
/* Show instructions and enable controls */
displayInstructions("Place horizontally, nose pointing north and click save position...", true);
displayInstructions(tr("Place horizontally, nose pointing north and click save position..."), true);
showHelp(CALIBRATION_HELPER_IMAGE_NED);
disableAllCalibrations();
savePositionEnabledChanged(true);
@ -186,7 +186,7 @@ void SixPointCalibrationModel::savePositionData()
connect(accelState, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(getSample(UAVObject *)));
connect(mag, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(getSample(UAVObject *)));
displayInstructions("Hold...", false);
displayInstructions(tr("Hold..."), false);
}
/**
@ -242,23 +242,23 @@ void SixPointCalibrationModel::getSample(UAVObject *obj)
position = (position + 1) % 6;
if (position == 1) {
displayInstructions("Place with nose down, right side west and click save position...", false);
displayInstructions(tr("Place with nose down, right side west and click save position..."), false);
showHelp(CALIBRATION_HELPER_IMAGE_DWN);
}
if (position == 2) {
displayInstructions("Place right side down, nose west and click save position...", false);
displayInstructions(tr("Place right side down, nose west and click save position..."), false);
showHelp(CALIBRATION_HELPER_IMAGE_WDS);
}
if (position == 3) {
displayInstructions("Place upside down, nose east and click save position...", false);
displayInstructions(tr("Place upside down, nose east and click save position..."), false);
showHelp(CALIBRATION_HELPER_IMAGE_ENU);
}
if (position == 4) {
displayInstructions("Place with nose up, left side north and click save position...", false);
displayInstructions(tr("Place with nose up, left side north and click save position..."), false);
showHelp(CALIBRATION_HELPER_IMAGE_USE);
}
if (position == 5) {
displayInstructions("Place with left side down, nose south and click save position...", false);
displayInstructions(tr("Place with left side down, nose south and click save position..."), false);
showHelp(CALIBRATION_HELPER_IMAGE_SUW);
}
if (position == 0) {
@ -267,7 +267,6 @@ void SixPointCalibrationModel::getSample(UAVObject *obj)
enableAllCalibrations();
showHelp(CALIBRATION_HELPER_IMAGE_EMPTY);
/* Cleanup original settings */
accelState->setMetadata(initialAccelStateMdata);
@ -369,9 +368,9 @@ void SixPointCalibrationModel::compute(bool mag, bool accel)
} else {
accelGyroSettings->setData(savedSettings.accelGyroSettings);
}
displayInstructions("Computed sensor scale and bias...", true);
displayInstructions(tr("Sensor scale and bias computed succesfully."), true);
} else {
displayInstructions("Bad calibration. Please repeat.", true);
displayInstructions(tr("Bad calibration. Please review the instructions and repeat."), true);
}
position = -1; // set to run again
}