1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Merge branch 'samguns/OP-1897_improve_ground_input_manual_calibration' into rel-15.05

This commit is contained in:
abeck70 2015-05-21 22:45:53 +10:00
commit 70586be231

View File

@ -1703,23 +1703,15 @@ void ConfigInputWidget::simpleCalibration(bool enable)
} else {
manualCommandData = manualCommandObj->getData();
manualSettingsData = manualSettingsObj->getData();
systemSettingsData = systemSettingsObj->getData();
QMessageBox::StandardButton reply;
reply = QMessageBox::question(this, tr("Ground vehicle"),
tr("<p>Are you configuring a transmitter for your <b>ground vehicle</b> with reversible motor<br>"
"controlled by throttle stick?</p>"
"<p>If so, please make sure you've centered throttle control and press <b>Yes</b> button. Otherwise, press No.</p>"
"<p>Attention, if you press <b>Yes</b>, then the <b>Flight Mode Count</b> will be set to 1.</p>"),
QMessageBox::Yes | QMessageBox::No);
if (systemSettingsData.AirframeType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLECAR) {
QMessageBox::warning(this, tr("Ground Vehicle"),
tr("<p>Please <b>center</b> throttle control and press OK when ready.</p>"));
if (reply == QMessageBox::Yes) {
transmitterType = ground;
manualSettingsData.ChannelNeutral[ManualControlSettings::CHANNELNEUTRAL_THROTTLE] =
manualCommandData.Channel[ManualControlSettings::CHANNELNUMBER_THROTTLE];
/* Make sure to tell controller, this is really a ground vehicle. */
systemSettingsData = systemSettingsObj->getData();
systemSettingsData.AirframeType = SystemSettings::AIRFRAMETYPE_GROUNDVEHICLECAR;
systemSettingsObj->setData(systemSettingsData);
}
restoreMdataSingle(manualCommandObj, &manualControlMdata);