mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-09 23:28:12 +00:00
Multi Telemetry: fixed DSM
This commit is contained in:
parent
8efa5bc1dc
commit
72ebe937fb
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 1
|
#define VERSION_MINOR 1
|
||||||
#define VERSION_REVISION 6
|
#define VERSION_REVISION 6
|
||||||
#define VERSION_PATCH_LEVEL 3
|
#define VERSION_PATCH_LEVEL 4
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
|
@ -101,22 +101,25 @@ static void multi_send_status()
|
|||||||
#ifdef MULTI_TELEMETRY
|
#ifdef MULTI_TELEMETRY
|
||||||
void DSM_frame()
|
void DSM_frame()
|
||||||
{
|
{
|
||||||
if (pkt[0] == 0x80) {
|
if (pkt[0] == 0x80)
|
||||||
|
{
|
||||||
multi_send_header(MULTI_TELEMETRY_DSMBIND, 10);
|
multi_send_header(MULTI_TELEMETRY_DSMBIND, 10);
|
||||||
for (uint8_t i = 1; i < 11; i++) // 10 byte of DSM bind response
|
for (uint8_t i = 1; i < 11; i++) // 10 bytes of DSM bind response
|
||||||
Serial_write(pkt[i]);
|
Serial_write(pkt[i]);
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
multi_send_header(MULTI_TELEMETRY_DSM, 17);
|
multi_send_header(MULTI_TELEMETRY_DSM, 17);
|
||||||
for (uint8_t i = 0; i < 29; i++) // RSSI value followed by 4*7 bytes of telemetry data
|
for (uint8_t i = 0; i < 17; i++) // RSSI value followed by 16 bytes of telemetry data
|
||||||
Serial_write(pkt[i]);
|
Serial_write(pkt[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void DSM_frame()
|
void DSM_frame()
|
||||||
{
|
{
|
||||||
Serial_write(0xAA); // Telemetry packet
|
Serial_write(0xAA); // Telemetry packet
|
||||||
for (uint8_t i = 0; i < 17; i++) // RSSI value followed by 16 bytes of telemetry data
|
for (uint8_t i = 0; i < 17; i++) // RSSI value followed by 16 bytes of telemetry data
|
||||||
Serial_write(pkt[i]);
|
Serial_write(pkt[i]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -128,9 +131,9 @@ static void multi_send_status()
|
|||||||
#if defined MULTI_TELEMETRY
|
#if defined MULTI_TELEMETRY
|
||||||
multi_send_header(MULTI_TELEMETRY_AFHDS2A, 29);
|
multi_send_header(MULTI_TELEMETRY_AFHDS2A, 29);
|
||||||
#else
|
#else
|
||||||
Serial_write(0xAA); // Telemetry packet
|
Serial_write(0xAA); // Telemetry packet
|
||||||
#endif
|
#endif
|
||||||
for (uint8_t i = 0; i < 29; i++) // RSSI value followed by 4*7 bytes of telemetry data
|
for (uint8_t i = 0; i < 29; i++) // RSSI value followed by 4*7 bytes of telemetry data
|
||||||
Serial_write(pkt[i]);
|
Serial_write(pkt[i]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user