Commit 8655b608 authored by Don Gagne's avatar Don Gagne

Show text on already used channels

parent ae8ea3bf
...@@ -42,9 +42,11 @@ QGCView { ...@@ -42,9 +42,11 @@ QGCView {
// User visible strings // User visible strings
readonly property string topHelpText: "Assign Flight Modes to radio control channels and adjust the thresholds for triggering them. " + property string topHelpText: "Assign Flight Modes to radio control channels and adjust the thresholds for triggering them. " +
"You can assign multiple flight modes to a single channel. " + "You can assign multiple flight modes to a single channel. " +
"Turn your radio control on to test switch settings." "Turn your radio control on to test switch settings. " +
"The following channels: " + controller.reservedChannels +
" are not available for Flight Modes since they are already in use for other functions."
readonly property string fwManualModeName: "Manual/Main" readonly property string fwManualModeName: "Manual/Main"
......
...@@ -141,6 +141,17 @@ void FlightModesComponentController::_init(void) ...@@ -141,6 +141,17 @@ void FlightModesComponentController::_init(void)
} }
} }
// Setup reserved channels string for ui
bool first = true;
foreach (int usedChannel, usedChannels) {
if (!first) {
_reservedChannels += ", ";
}
_reservedChannels += QString("%1").arg(usedChannel);
first = false;
}
_recalcModeRows(); _recalcModeRows();
} }
......
...@@ -51,6 +51,8 @@ public: ...@@ -51,6 +51,8 @@ public:
Q_PROPERTY(int channelCount MEMBER _channelCount CONSTANT) Q_PROPERTY(int channelCount MEMBER _channelCount CONSTANT)
Q_PROPERTY(bool fixedWing MEMBER _fixedWing CONSTANT) Q_PROPERTY(bool fixedWing MEMBER _fixedWing CONSTANT)
Q_PROPERTY(QString reservedChannels MEMBER _reservedChannels CONSTANT)
Q_PROPERTY(int assistModeRow MEMBER _assistModeRow NOTIFY modeRowsChanged) Q_PROPERTY(int assistModeRow MEMBER _assistModeRow NOTIFY modeRowsChanged)
Q_PROPERTY(int autoModeRow MEMBER _autoModeRow NOTIFY modeRowsChanged) Q_PROPERTY(int autoModeRow MEMBER _autoModeRow NOTIFY modeRowsChanged)
Q_PROPERTY(int acroModeRow MEMBER _acroModeRow NOTIFY modeRowsChanged) Q_PROPERTY(int acroModeRow MEMBER _acroModeRow NOTIFY modeRowsChanged)
...@@ -214,6 +216,7 @@ private: ...@@ -214,6 +216,7 @@ private:
bool _validConfiguration; bool _validConfiguration;
QString _configurationErrors; QString _configurationErrors;
int _channelCount; int _channelCount;
QString _reservedChannels;
int _assistModeRow; int _assistModeRow;
int _autoModeRow; int _autoModeRow;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment