From df45a3ff8352507e66491b9fefdef7a3b61ea6ef Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Mon, 21 Sep 2020 10:50:01 +0200 Subject: [PATCH] OMP: prevent telemetry voltage from rolling over --- Multiprotocol/Multiprotocol.h | 2 +- Multiprotocol/OMP_cc2500.ino | 6 +++++- Protocols_Details.md | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 06416a5..411f8d1 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 1 -#define VERSION_PATCH_LEVEL 65 +#define VERSION_PATCH_LEVEL 66 //****************** // Protocols diff --git a/Multiprotocol/OMP_cc2500.ino b/Multiprotocol/OMP_cc2500.ino index 1b3407b..00ba86b 100644 --- a/Multiprotocol/OMP_cc2500.ino +++ b/Multiprotocol/OMP_cc2500.ino @@ -187,7 +187,11 @@ uint16_t OMP_callback() // packet_in = 01 00 98 2C 03 19 19 F0 49 02 00 00 00 00 00 00 // all bytes are fixed and unknown except 2 and 3 which represent the battery voltage: packet_in[3]*256+packet_in[2]=lipo voltage*100 in V telemetry_counter++; //LQI - v_lipo1=((packet_in[3]<<8)+packet_in[2]-400)/50; + uint16_t v=((packet_in[3]<<8)+packet_in[2]-400)/50; + if(v>255) + v_lipo1=255; + else + v_lipo1=v; telemetry_link=1; if(telemetry_lost) { diff --git a/Protocols_Details.md b/Protocols_Details.md index a533ce7..ab1b35a 100644 --- a/Protocols_Details.md +++ b/Protocols_Details.md @@ -556,6 +556,7 @@ You should definitively upgrade your receivers/sensors to the latest firmware ve Model: OMPHOBBY M2 Heli, T720 RC Glider Telemetry supported with A1=battery voltage (you need to adjust the offset with a voltmeter since there are some large differences between the models), RX_RSSI = TQly = percentage of received telemetry packets which has nothing to do with well the RX is receiving the TX but instead how well the TX=multi module is receiving the RX. +Telemetry is using the NRF24L01 RF component @250K so depending on your module it might not work well. Option for this protocol corresponds to fine frequency tuning. This value is different for each Module and **must** be accurate otherwise the link will not be stable. Check the [Frequency Tuning page](/docs/Frequency_Tuning.md) to determine it.