mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1604 Initialize accessoryDesiredObjects the the plugin constructor
This commit is contained in:
parent
90e0459522
commit
fd801e3637
@ -68,6 +68,14 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) :
|
|||||||
flightModeSettingsObj = FlightModeSettings::GetInstance(getObjectManager());
|
flightModeSettingsObj = FlightModeSettings::GetInstance(getObjectManager());
|
||||||
flightStatusObj = FlightStatus::GetInstance(getObjectManager());
|
flightStatusObj = FlightStatus::GetInstance(getObjectManager());
|
||||||
receiverActivityObj = ReceiverActivity::GetInstance(getObjectManager());
|
receiverActivityObj = ReceiverActivity::GetInstance(getObjectManager());
|
||||||
|
accessoryDesiredObj0 = AccessoryDesired::GetInstance(getObjectManager(), 0);
|
||||||
|
accessoryDesiredObj1 = AccessoryDesired::GetInstance(getObjectManager(), 1);
|
||||||
|
accessoryDesiredObj2 = AccessoryDesired::GetInstance(getObjectManager(), 2);
|
||||||
|
|
||||||
|
// Only instance 0 is present if the board is not connected.
|
||||||
|
// The other instances are populated lazily.
|
||||||
|
Q_ASSERT(accessoryDesiredObj0);
|
||||||
|
|
||||||
ui = new Ui_InputWidget();
|
ui = new Ui_InputWidget();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
@ -401,14 +409,6 @@ void ConfigInputWidget::goToWizard()
|
|||||||
flightModeSettingsData.Arming = FlightModeSettings::ARMING_ALWAYSDISARMED;
|
flightModeSettingsData.Arming = FlightModeSettings::ARMING_ALWAYSDISARMED;
|
||||||
flightModeSettingsObj->setData(flightModeSettingsData);
|
flightModeSettingsObj->setData(flightModeSettingsData);
|
||||||
|
|
||||||
accessoryDesiredObj0 = AccessoryDesired::GetInstance(getObjectManager(), 0);
|
|
||||||
accessoryDesiredObj1 = AccessoryDesired::GetInstance(getObjectManager(), 1);
|
|
||||||
accessoryDesiredObj2 = AccessoryDesired::GetInstance(getObjectManager(), 2);
|
|
||||||
|
|
||||||
// Only instance 0 is present if the board is not connected.
|
|
||||||
// The other instances are populated lazily.
|
|
||||||
Q_ASSERT(accessoryDesiredObj0);
|
|
||||||
|
|
||||||
// Use faster input update rate.
|
// Use faster input update rate.
|
||||||
fastMdata();
|
fastMdata();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user