mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1781 Make sure the vehicle type is correct, next step will be acro, heli tests and minor modifications.
This commit is contained in:
parent
f806a9d3f2
commit
1811b5f1fd
@ -72,6 +72,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) :
|
|||||||
accessoryDesiredObj1 = AccessoryDesired::GetInstance(getObjectManager(), 1);
|
accessoryDesiredObj1 = AccessoryDesired::GetInstance(getObjectManager(), 1);
|
||||||
accessoryDesiredObj2 = AccessoryDesired::GetInstance(getObjectManager(), 2);
|
accessoryDesiredObj2 = AccessoryDesired::GetInstance(getObjectManager(), 2);
|
||||||
actuatorSettingsObj = ActuatorSettings::GetInstance(getObjectManager());
|
actuatorSettingsObj = ActuatorSettings::GetInstance(getObjectManager());
|
||||||
|
systemSettingsObj = SystemSettings::GetInstance(getObjectManager());
|
||||||
|
|
||||||
// Only instance 0 is present if the board is not connected.
|
// Only instance 0 is present if the board is not connected.
|
||||||
// The other instances are populated lazily.
|
// The other instances are populated lazily.
|
||||||
@ -351,9 +352,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) :
|
|||||||
|
|
||||||
groundChannelOrder << ManualControlSettings::CHANNELGROUPS_THROTTLE <<
|
groundChannelOrder << ManualControlSettings::CHANNELGROUPS_THROTTLE <<
|
||||||
ManualControlSettings::CHANNELGROUPS_YAW <<
|
ManualControlSettings::CHANNELGROUPS_YAW <<
|
||||||
ManualControlSettings::CHANNELGROUPS_ACCESSORY0 <<
|
ManualControlSettings::CHANNELGROUPS_ACCESSORY0;
|
||||||
ManualControlSettings::CHANNELGROUPS_ACCESSORY1 <<
|
|
||||||
ManualControlSettings::CHANNELGROUPS_ACCESSORY2;
|
|
||||||
|
|
||||||
updateEnableControls();
|
updateEnableControls();
|
||||||
}
|
}
|
||||||
@ -770,7 +769,11 @@ void ConfigInputWidget::wizardTearDownStep(enum wizardSteps step)
|
|||||||
if (wizardUi->typeAcro->isChecked()) {
|
if (wizardUi->typeAcro->isChecked()) {
|
||||||
transmitterType = acro;
|
transmitterType = acro;
|
||||||
} else if (wizardUi->typeGround->isChecked()) {
|
} else if (wizardUi->typeGround->isChecked()) {
|
||||||
transmitterType = ground;
|
transmitterType = ground;
|
||||||
|
/* Make sure to tell controller, this is really a ground vehicle. */
|
||||||
|
systemSettingsData = systemSettingsObj->getData();
|
||||||
|
systemSettingsData.AirframeType = SystemSettings::AIRFRAMETYPE_GROUNDVEHICLECAR;
|
||||||
|
systemSettingsObj->setData(systemSettingsData);
|
||||||
} else {
|
} else {
|
||||||
transmitterType = heli;
|
transmitterType = heli;
|
||||||
}
|
}
|
||||||
@ -1688,6 +1691,10 @@ void ConfigInputWidget::simpleCalibration(bool enable)
|
|||||||
transmitterType = ground;
|
transmitterType = ground;
|
||||||
manualSettingsData.ChannelNeutral[ManualControlSettings::CHANNELNEUTRAL_THROTTLE] =
|
manualSettingsData.ChannelNeutral[ManualControlSettings::CHANNELNEUTRAL_THROTTLE] =
|
||||||
manualCommandData.Channel[ManualControlSettings::CHANNELNUMBER_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);
|
restoreMdataSingle(manualCommandObj, &manualControlMdata);
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#include "flightstatus.h"
|
#include "flightstatus.h"
|
||||||
#include "accessorydesired.h"
|
#include "accessorydesired.h"
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
#include "systemsettings.h"
|
||||||
|
|
||||||
class Ui_InputWidget;
|
class Ui_InputWidget;
|
||||||
|
|
||||||
@ -139,6 +140,9 @@ private:
|
|||||||
ReceiverActivity *receiverActivityObj;
|
ReceiverActivity *receiverActivityObj;
|
||||||
ReceiverActivity::DataFields receiverActivityData;
|
ReceiverActivity::DataFields receiverActivityData;
|
||||||
|
|
||||||
|
SystemSettings *systemSettingsObj;
|
||||||
|
SystemSettings::DataFields systemSettingsData;
|
||||||
|
|
||||||
QSvgRenderer *m_renderer;
|
QSvgRenderer *m_renderer;
|
||||||
|
|
||||||
// Background: background
|
// Background: background
|
||||||
|
Loading…
Reference in New Issue
Block a user