Yuxiang telemetry

Offset=7, Ratio=3.5
This commit is contained in:
pascallanger 2025-01-18 12:19:33 +01:00
parent 7fbca99bf3
commit a44126583e
3 changed files with 13 additions and 9 deletions

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 4
#define VERSION_PATCH_LEVEL 17
#define VERSION_PATCH_LEVEL 18
#define MODE_SERIAL 0

View File

@ -26,7 +26,7 @@ Multiprotocol is distributed in the hope that it will be useful,
#define YUXIANG_RF_NUM_CHANNELS 4
#define YUXIANG_WRITE_TIME 1000
#define YUXIANG_TELEM_DEBUG
>>#define YUXIANG_TELEM_DEBUG
enum
{
@ -163,18 +163,22 @@ uint16_t YUXIANG_callback()
#endif
if(XN297_ReadPayload(packet_in, YUXIANG_PACKET_SIZE))
{ // packet with good CRC and length
#ifdef YUXIANG_TELEM_DEBUG
debug("OK:");
for(uint8_t i=0;i<YUXIANG_PACKET_SIZE;i++)
debug(" %02X",packet_in[i]);
#endif
uint8_t checksum = 0;
for(uint8_t i=0; i<YUXIANG_PACKET_SIZE-1; i++)
checksum += packet_in[i];
if(packet_in[8] == checksum)
{
#ifdef YUXIANG_HUB_TELEMETRY
if(packet_in[0]==0x78)
{
#ifdef YUXIANG_TELEM_DEBUG
debug("OK:");
for(uint8_t i=0;i<YUXIANG_PACKET_SIZE;i++)
debug(" %02X",packet_in[i]);
#endif
v_lipo1 = packet_in[4];
v_lipo2 = packet_in[6];
}
telemetry_link = 1;
#endif
telemetry_lost = 0;

View File

@ -2193,7 +2193,7 @@ Same channels assignement as above.
Models: E190, F07 UH-1D
**Only 2 TX ID, use the RX number to switch**.
Telemetry is received but content unknown yet.
Telemetry A1=Batt voltage with a Ratio 3.5 and Offset 7, A2=Low batt with 0=OK, everything else=BAD
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
---|---|---|---|---|---|---|---|---|---|---