diff --git a/companion/src/datamodels/compounditemmodels.cpp b/companion/src/datamodels/compounditemmodels.cpp index f4a135ee7..29dc9b8f5 100644 --- a/companion/src/datamodels/compounditemmodels.cpp +++ b/companion/src/datamodels/compounditemmodels.cpp @@ -118,7 +118,7 @@ RawSourceItemModel::RawSourceItemModel(const GeneralSettings * const generalSett addItems(SOURCE_TYPE_CYC, RawSource::SourcesGroup, CPN_MAX_CYC); addItems(SOURCE_TYPE_PPM, RawSource::SourcesGroup, firmware->getCapability(TrainerInputs)); addItems(SOURCE_TYPE_CH, RawSource::SourcesGroup, firmware->getCapability(Outputs)); - addItems(SOURCE_TYPE_SPECIAL, RawSource::TelemGroup, 5); + addItems(SOURCE_TYPE_SPECIAL, RawSource::TelemGroup, 6); addItems(SOURCE_TYPE_TELEMETRY, RawSource::TelemGroup, firmware->getCapability(Sensors) * 3); addItems(SOURCE_TYPE_GVAR, RawSource::GVarsGroup, firmware->getCapability(Gvars)); } diff --git a/companion/src/firmwares/edgetx/yaml_rawsource.cpp b/companion/src/firmwares/edgetx/yaml_rawsource.cpp index f0ffff324..868ab4776 100644 --- a/companion/src/firmwares/edgetx/yaml_rawsource.cpp +++ b/companion/src/firmwares/edgetx/yaml_rawsource.cpp @@ -44,11 +44,10 @@ const YamlLookupTable cycSourceLut = { const YamlLookupTable specialSourceLut = { { 0, "TX_VOLTAGE" }, { 1, "TX_TIME" }, - { 2, "ONE" }, + { 2, "TX_GPS" }, { 3, "TIMER1" }, { 4, "TIMER2" }, { 5, "TIMER3" }, - // TODO: { ???, "TX_GPS" }, }; std::string YamlRawSourceEncode(const RawSource& rhs) diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 5017308cc..51402e931 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -384,10 +384,11 @@ class SourcesConversionTable: public ConversionTable { addConversion(RawSource(SOURCE_TYPE_GVAR, i), val++); addConversion(RawSource(SOURCE_TYPE_SPECIAL, 0), val++); // BATT addConversion(RawSource(SOURCE_TYPE_SPECIAL, 1), val++); // TIME - val += 5; - addConversion(RawSource(SOURCE_TYPE_SPECIAL, 2), val++); // Timer1 - addConversion(RawSource(SOURCE_TYPE_SPECIAL, 3), val++); // Timer2 - addConversion(RawSource(SOURCE_TYPE_SPECIAL, 4), val++); // Timer3 + addConversion(RawSource(SOURCE_TYPE_SPECIAL, 2), val++); // GPS + val += 4; + addConversion(RawSource(SOURCE_TYPE_SPECIAL, 3), val++); // Timer1 + addConversion(RawSource(SOURCE_TYPE_SPECIAL, 4), val++); // Timer2 + addConversion(RawSource(SOURCE_TYPE_SPECIAL, 5), val++); // Timer3 for (int i=0; i 0); + return (type == SOURCE_TYPE_SPECIAL && index >= SOURCE_TYPE_SPECIAL_TIMER1_IDX); } bool RawSource::isAvailable(const ModelData * const model, const GeneralSettings * const gs, Board::Type board) const diff --git a/companion/src/firmwares/rawsource.h b/companion/src/firmwares/rawsource.h index a7d293173..25779ccd4 100644 --- a/companion/src/firmwares/rawsource.h +++ b/companion/src/firmwares/rawsource.h @@ -179,7 +179,7 @@ enum RawSourceType { }; constexpr int SOURCE_TYPE_STICK_THR_IDX { 3 }; // TODO is there a function to determine index? -constexpr int SOURCE_TYPE_SPECIAL_TIMER1_IDX { 2 }; // TODO temp const until Timers own source type +constexpr int SOURCE_TYPE_SPECIAL_TIMER1_IDX { 3 }; // TODO temp const until Timers own source type class RawSourceRange {