mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
OP-1458 Use fast input update rate throughout the TX wizard
This commit is contained in:
parent
c38242f627
commit
8614489467
@ -395,6 +395,9 @@ void ConfigInputWidget::goToWizard()
|
|||||||
flightModeSettingsData.Arming = FlightModeSettings::ARMING_ALWAYSDISARMED;
|
flightModeSettingsData.Arming = FlightModeSettings::ARMING_ALWAYSDISARMED;
|
||||||
flightModeSettingsObj->setData(flightModeSettingsData);
|
flightModeSettingsObj->setData(flightModeSettingsData);
|
||||||
|
|
||||||
|
// Use faster input update rate.
|
||||||
|
fastMdata();
|
||||||
|
|
||||||
// start the wizard
|
// start the wizard
|
||||||
wizardSetUpStep(wizardWelcome);
|
wizardSetUpStep(wizardWelcome);
|
||||||
ui->graphicsView->fitInView(m_txBackground, Qt::KeepAspectRatio);
|
ui->graphicsView->fitInView(m_txBackground, Qt::KeepAspectRatio);
|
||||||
@ -464,6 +467,10 @@ void ConfigInputWidget::wzNext()
|
|||||||
break;
|
break;
|
||||||
case wizardFinish:
|
case wizardFinish:
|
||||||
wizardStep = wizardNone;
|
wizardStep = wizardNone;
|
||||||
|
|
||||||
|
// Restore original input update rate.
|
||||||
|
restoreMdata();
|
||||||
|
|
||||||
// Leave setting the throttle neutral until the final Next press,
|
// Leave setting the throttle neutral until the final Next press,
|
||||||
// else the throttle scaling causes the graphical stick movement to not
|
// else the throttle scaling causes the graphical stick movement to not
|
||||||
// match the tx stick
|
// match the tx stick
|
||||||
@ -628,8 +635,7 @@ void ConfigInputWidget::wizardSetUpStep(enum wizardSteps step)
|
|||||||
accessoryDesiredObj2 = AccessoryDesired::GetInstance(getObjectManager(), 2);
|
accessoryDesiredObj2 = AccessoryDesired::GetInstance(getObjectManager(), 2);
|
||||||
setTxMovement(nothing);
|
setTxMovement(nothing);
|
||||||
ui->wzText->setText(QString(tr("Please move all controls to their maximum extents on both directions.\n\nPress Next when ready.")));
|
ui->wzText->setText(QString(tr("Please move all controls to their maximum extents on both directions.\n\nPress Next when ready.")));
|
||||||
fastMdata();
|
manualSettingsData = manualSettingsObj->getData();
|
||||||
manualSettingsData = manualSettingsObj->getData();
|
|
||||||
for (uint i = 0; i < ManualControlSettings::CHANNELMAX_NUMELEM; ++i) {
|
for (uint i = 0; i < ManualControlSettings::CHANNELMAX_NUMELEM; ++i) {
|
||||||
// Preserve the inverted status
|
// Preserve the inverted status
|
||||||
if (manualSettingsData.ChannelMin[i] <= manualSettingsData.ChannelMax[i]) {
|
if (manualSettingsData.ChannelMin[i] <= manualSettingsData.ChannelMax[i]) {
|
||||||
@ -665,7 +671,6 @@ void ConfigInputWidget::wizardSetUpStep(enum wizardSteps step)
|
|||||||
}
|
}
|
||||||
connect(manualCommandObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
connect(manualCommandObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
||||||
ui->wzText->setText(QString(tr("Please check the picture below and correct all the sticks which show an inverted movement. Press Next when ready.")));
|
ui->wzText->setText(QString(tr("Please check the picture below and correct all the sticks which show an inverted movement. Press Next when ready.")));
|
||||||
fastMdata();
|
|
||||||
break;
|
break;
|
||||||
case wizardFinish:
|
case wizardFinish:
|
||||||
dimOtherControls(false);
|
dimOtherControls(false);
|
||||||
@ -675,7 +680,6 @@ void ConfigInputWidget::wizardSetUpStep(enum wizardSteps step)
|
|||||||
ui->wzText->setText(QString(tr("You have completed this wizard, please check below if the picture mimics your sticks movement.\n\n"
|
ui->wzText->setText(QString(tr("You have completed this wizard, please check below if the picture mimics your sticks movement.\n\n"
|
||||||
"IMPORTANT: These new settings have not been saved to the board yet. After pressing Next you will go to the Arming Settings "
|
"IMPORTANT: These new settings have not been saved to the board yet. After pressing Next you will go to the Arming Settings "
|
||||||
"tab where you can set your desired arming sequence and save the configuration.")));
|
"tab where you can set your desired arming sequence and save the configuration.")));
|
||||||
fastMdata();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
@ -732,7 +736,6 @@ void ConfigInputWidget::wizardTearDownStep(enum wizardSteps step)
|
|||||||
disconnect(flightStatusObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
disconnect(flightStatusObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
||||||
disconnect(accessoryDesiredObj0, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
disconnect(accessoryDesiredObj0, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
||||||
manualSettingsObj->setData(manualSettingsData);
|
manualSettingsObj->setData(manualSettingsData);
|
||||||
restoreMdata();
|
|
||||||
setTxMovement(nothing);
|
setTxMovement(nothing);
|
||||||
break;
|
break;
|
||||||
case wizardIdentifyInverted:
|
case wizardIdentifyInverted:
|
||||||
@ -747,7 +750,6 @@ void ConfigInputWidget::wizardTearDownStep(enum wizardSteps step)
|
|||||||
}
|
}
|
||||||
extraWidgets.clear();
|
extraWidgets.clear();
|
||||||
disconnect(manualCommandObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
disconnect(manualCommandObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
||||||
restoreMdata();
|
|
||||||
break;
|
break;
|
||||||
case wizardFinish:
|
case wizardFinish:
|
||||||
dimOtherControls(false);
|
dimOtherControls(false);
|
||||||
@ -755,7 +757,6 @@ void ConfigInputWidget::wizardTearDownStep(enum wizardSteps step)
|
|||||||
disconnect(manualCommandObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
disconnect(manualCommandObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
||||||
disconnect(flightStatusObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
disconnect(flightStatusObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
||||||
disconnect(accessoryDesiredObj0, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
disconnect(accessoryDesiredObj0, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(moveSticks()));
|
||||||
restoreMdata();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user