From 49184bfac1baad0080c6b60cd8fefe52c8c57573 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Fri, 23 Aug 2019 08:32:03 +0200 Subject: [PATCH] sensor instance -1 --- companion/src/firmwares/opentx/opentxeeprom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 35d2734ea..3feb72851 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -1892,7 +1892,7 @@ class SensorField: public TransformedField { if (sensor.type == SensorData::TELEM_TYPE_CUSTOM) { sensor.id = _id; sensor.subid = _subid; - sensor.instance = _instance & 0x1F; // 5 bits instance + sensor.instance = (_instance & 0x1F) + (version <= 218 ? -1 : 0); // 5 bits instance sensor.rxIdx = (_instance >> 5) & 0x03; // 2 bits Rx idx sensor.moduleIdx = (_instance >> 7) & 0x1; // 1 bit module idx sensor.ratio = _ratio;