mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-505 Disable serial-telemetry options per stream/vcp used
This commit is contained in:
parent
cac8807941
commit
f2cc267435
@ -267,6 +267,27 @@ void ConfigOPLinkWidget::updateSettings()
|
||||
bool is_vcp_flexi = isComboboxOptionSelected(m_oplink->VCPBridge, OPLinkSettings::VCPBRIDGE_FLEXI);
|
||||
bool is_bound = (m_oplink->CoordID->text() != "");
|
||||
|
||||
bool is_stream_main = isComboboxOptionSelected(m_oplink->RadioPriStream, OPLinkSettings::RADIOPRISTREAM_MAIN) ||
|
||||
isComboboxOptionSelected(m_oplink->RadioAuxStream, OPLinkSettings::RADIOAUXSTREAM_MAIN);
|
||||
bool is_stream_flexi = isComboboxOptionSelected(m_oplink->RadioPriStream, OPLinkSettings::RADIOPRISTREAM_FLEXI) ||
|
||||
isComboboxOptionSelected(m_oplink->RadioAuxStream, OPLinkSettings::RADIOAUXSTREAM_FLEXI);
|
||||
|
||||
if (!is_stream_main && !is_vcp_main && (is_main_serial || is_main_telem)) {
|
||||
setComboboxSelectedOption(m_oplink->MainPort, OPLinkSettings::MAINPORT_DISABLED);
|
||||
is_main_serial = false;
|
||||
is_main_telem = false;
|
||||
}
|
||||
if (!is_stream_flexi && !is_vcp_flexi && (is_flexi_serial || is_flexi_telem)) {
|
||||
setComboboxSelectedOption(m_oplink->FlexiPort, OPLinkSettings::FLEXIPORT_DISABLED);
|
||||
is_flexi_serial = false;
|
||||
is_flexi_telem = false;
|
||||
}
|
||||
|
||||
enableComboBoxOptionItem(m_oplink->FlexiPort, OPLinkSettings::FLEXIPORT_TELEMETRY, is_stream_flexi);
|
||||
enableComboBoxOptionItem(m_oplink->FlexiPort, OPLinkSettings::FLEXIPORT_SERIAL, (is_stream_flexi || is_vcp_flexi));
|
||||
enableComboBoxOptionItem(m_oplink->MainPort, OPLinkSettings::MAINPORT_TELEMETRY, is_stream_main);
|
||||
enableComboBoxOptionItem(m_oplink->MainPort, OPLinkSettings::MAINPORT_SERIAL, (is_stream_main || is_vcp_main));
|
||||
|
||||
m_oplink->MainPort->setEnabled((is_enabled && !is_openlrs) || is_vcp_main);
|
||||
m_oplink->FlexiPort->setEnabled((is_enabled && !is_openlrs) || is_vcp_flexi);
|
||||
m_oplink->MainComSpeed->setEnabled(is_enabled && !is_openlrs && !is_ppm_only && !is_vcp_main && (is_main_serial || is_main_telem));
|
||||
|
Loading…
x
Reference in New Issue
Block a user