mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Servo input config was missing the accessory inputs. Changed the plugin to remove any hardcoded value, so it should be safe for future new channel assignement types
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1578 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
e6fea9bb76
commit
ce53757baa
@ -83,6 +83,8 @@ ConfigServoWidget::ConfigServoWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
<< m_config->ch6Rev
|
||||
<< m_config->ch7Rev;
|
||||
|
||||
|
||||
|
||||
// Now connect the widget to the ManualControlCommand / Channel UAVObject
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||
@ -567,12 +569,14 @@ void ConfigServoWidget::requestRCInputUpdate()
|
||||
m_config->ch6Assign->setCurrentIndex(0);
|
||||
m_config->ch7Assign->setCurrentIndex(0);
|
||||
|
||||
|
||||
// Update all channels assignements
|
||||
assignChannel(obj, field, QString("Roll"));
|
||||
assignChannel(obj, field, QString("Pitch"));
|
||||
assignChannel(obj, field, QString("Yaw"));
|
||||
assignChannel(obj, field, QString("Throttle"));
|
||||
assignChannel(obj, field, QString("FlightMode"));
|
||||
QList<UAVObjectField*> fieldList = obj->getFields();
|
||||
foreach (UAVObjectField* field, fieldList) {
|
||||
if (field->getUnits().contains("channel")) {
|
||||
assignChannel(obj, field, field->getName());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user