mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-02 19:29:15 +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->ch6Rev
|
||||||
<< m_config->ch7Rev;
|
<< m_config->ch7Rev;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Now connect the widget to the ManualControlCommand / Channel UAVObject
|
// Now connect the widget to the ManualControlCommand / Channel UAVObject
|
||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||||
@ -567,12 +569,14 @@ void ConfigServoWidget::requestRCInputUpdate()
|
|||||||
m_config->ch6Assign->setCurrentIndex(0);
|
m_config->ch6Assign->setCurrentIndex(0);
|
||||||
m_config->ch7Assign->setCurrentIndex(0);
|
m_config->ch7Assign->setCurrentIndex(0);
|
||||||
|
|
||||||
|
|
||||||
// Update all channels assignements
|
// Update all channels assignements
|
||||||
assignChannel(obj, field, QString("Roll"));
|
QList<UAVObjectField*> fieldList = obj->getFields();
|
||||||
assignChannel(obj, field, QString("Pitch"));
|
foreach (UAVObjectField* field, fieldList) {
|
||||||
assignChannel(obj, field, QString("Yaw"));
|
if (field->getUnits().contains("channel")) {
|
||||||
assignChannel(obj, field, QString("Throttle"));
|
assignChannel(obj, field, field->getName());
|
||||||
assignChannel(obj, field, QString("FlightMode"));
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user