15 Q_PROPERTY(QString modeParamPrefix MEMBER _modeParamPrefix CONSTANT)
16 Q_PROPERTY(QString modeChannelParam MEMBER _modeChannelParam CONSTANT)
18 Q_PROPERTY(
int channelCount MEMBER _channelCount CONSTANT)
20 Q_PROPERTY(
bool simpleModesSupported MEMBER _simpleModesSupported CONSTANT)
21 Q_PROPERTY(QStringList simpleModeNames MEMBER _simpleModeNames CONSTANT)
29 enum SimpleModeValues {
30 SimpleModeStandard = 0,
32 SimpleModeSuperSimple,
35 Q_ENUM(SimpleModeValues)
37 Q_INVOKABLE
void setSimpleMode(
int fltModeIndex,
bool enabled);
38 Q_INVOKABLE
void setSuperSimpleMode(
int fltModeIndex,
bool enabled);
40 int activeFlightMode()
const {
return _activeFlightMode; }
41 QVariantList channelOptionEnabled()
const {
return _rgChannelOptionEnabled; }
51 void channelValuesChanged(QVector<int> pwmValues);
52 void _updateSimpleParamsFromSimpleMode();
53 void _setupSimpleModeEnabled();
56 Fact *_simpleModeFact =
nullptr;
57 Fact *_superSimpleModeFact =
nullptr;
58 const bool _simpleModesSupported =
false;
59 int _activeFlightMode = 0;
61 int _simpleMode = SimpleModeStandard;
62 QString _modeChannelParam;
63 QString _modeParamPrefix;
64 const QStringList _simpleModeNames = { tr(
"Off"), tr(
"Simple"), tr(
"Super-Simple"), tr(
"Custom") };
65 QVariantList _rgChannelOptionEnabled;
67 QVariantList _simpleModeEnabled;
68 QVariantList _superSimpleModeEnabled;
70 static constexpr uint8_t _allSimpleBits = 0x3F;
71 static constexpr int _cChannelOptions = 11;
72 static constexpr int _cSimpleModeBits = 8;
73 static constexpr int _cFltModes = 6;
75 static constexpr const char *_simpleParamName =
"SIMPLE";
76 static constexpr const char *_superSimpleParamName =
"SUPER_SIMPLE";