Skip to content

Commit

Permalink
Yuxiang telemetry
Browse files Browse the repository at this point in the history
Offset=7, Ratio=3.5
  • Loading branch information
pascallanger committed Jan 18, 2025
1 parent 7fbca99 commit a441265
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Multiprotocol/Multiprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 11 additions & 7 deletions Multiprotocol/Yuxiang_nrf24l01.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
v_lipo1 = packet_in[4];
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;
Expand Down
2 changes: 1 addition & 1 deletion Protocols_Details.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---|---|---|---|---|---|---|---|---|---|---
Expand Down

0 comments on commit a441265

Please sign in to comment.