1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

hwsettings: add HID and VCP config to hwsettings gui

This commit is contained in:
Stacey Sheldon 2011-12-28 16:18:44 -05:00
parent 56c4ff8f40
commit ad793f0b81
2 changed files with 34 additions and 1 deletions

View File

@ -71,7 +71,7 @@
</property>
</widget>
</item>
<item row="1" column="4">
<item row="1" column="5">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -84,6 +84,32 @@
</property>
</spacer>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_8">
<property name="text">
<string>USB HID Port</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QComboBox" name="cbUsbHid"/>
</item>
<item row="3" column="4">
<widget class="QLabel" name="label_9">
<property name="text">
<string>USB VCP Port</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QComboBox" name="cbUsbVcp"/>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_7">
<property name="text">

View File

@ -44,6 +44,8 @@ ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
addUAVObjectToWidgetRelation("HwSettings","CC_FlexiPort",m_telemetry->cbFlexi);
addUAVObjectToWidgetRelation("HwSettings","CC_MainPort",m_telemetry->cbTele);
addUAVObjectToWidgetRelation("HwSettings","CC_RcvrPort",m_telemetry->cbRcvr);
addUAVObjectToWidgetRelation("HwSettings","USB_HIDPort",m_telemetry->cbUsbHid);
addUAVObjectToWidgetRelation("HwSettings","USB_VCPPort",m_telemetry->cbUsbVcp);
addUAVObjectToWidgetRelation("HwSettings","TelemetrySpeed",m_telemetry->telemetrySpeed);
addUAVObjectToWidgetRelation("HwSettings","GPSSpeed",m_telemetry->gpsSpeed);
addUAVObjectToWidgetRelation("HwSettings","ComUsbBridgeSpeed",m_telemetry->comUsbBridgeSpeed);
@ -74,6 +76,11 @@ void ConfigCCHWWidget::widgetsContentsChanged()
enableControls(false);
m_telemetry->problems->setText(tr("Warning: you have configured both MainPort and FlexiPort for the same function, this currently is not supported"));
}
else if ((m_telemetry->cbUsbHid->currentIndex() == HwSettings::USB_HIDPORT_USBTELEMETRY) && (m_telemetry->cbUsbVcp->currentIndex() == HwSettings::USB_VCPPORT_USBTELEMETRY))
{
enableControls(false);
m_telemetry->problems->setText(tr("Warning: you have configured both USB HID Port and USB VCP Port for the same function, this currently is not supported"));
}
else
{
m_telemetry->problems->setText("");