mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 18:48:11 +00:00
Yuxiang telemetry
Offset=7, Ratio=3.5
This commit is contained in:
parent
7fbca99bf3
commit
a44126583e
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 4
|
#define VERSION_REVISION 4
|
||||||
#define VERSION_PATCH_LEVEL 17
|
#define VERSION_PATCH_LEVEL 18
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define YUXIANG_RF_NUM_CHANNELS 4
|
#define YUXIANG_RF_NUM_CHANNELS 4
|
||||||
|
|
||||||
#define YUXIANG_WRITE_TIME 1000
|
#define YUXIANG_WRITE_TIME 1000
|
||||||
#define YUXIANG_TELEM_DEBUG
|
>>#define YUXIANG_TELEM_DEBUG
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -163,18 +163,22 @@ uint16_t YUXIANG_callback()
|
|||||||
#endif
|
#endif
|
||||||
if(XN297_ReadPayload(packet_in, YUXIANG_PACKET_SIZE))
|
if(XN297_ReadPayload(packet_in, YUXIANG_PACKET_SIZE))
|
||||||
{ // packet with good CRC and length
|
{ // 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;
|
uint8_t checksum = 0;
|
||||||
for(uint8_t i=0; i<YUXIANG_PACKET_SIZE-1; i++)
|
for(uint8_t i=0; i<YUXIANG_PACKET_SIZE-1; i++)
|
||||||
checksum += packet_in[i];
|
checksum += packet_in[i];
|
||||||
if(packet_in[8] == checksum)
|
if(packet_in[8] == checksum)
|
||||||
{
|
{
|
||||||
#ifdef YUXIANG_HUB_TELEMETRY
|
#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_lipo1 = packet_in[4];
|
||||||
|
v_lipo2 = packet_in[6];
|
||||||
|
}
|
||||||
telemetry_link = 1;
|
telemetry_link = 1;
|
||||||
#endif
|
#endif
|
||||||
telemetry_lost = 0;
|
telemetry_lost = 0;
|
||||||
|
@ -2193,7 +2193,7 @@ Same channels assignement as above.
|
|||||||
Models: E190, F07 UH-1D
|
Models: E190, F07 UH-1D
|
||||||
|
|
||||||
**Only 2 TX ID, use the RX number to switch**.
|
**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
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
|
||||||
---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user