mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 17:58:13 +00:00
SBUS/CPPM: fixed telemetry_link
This commit is contained in:
parent
bb70116df0
commit
593f3b87f1
@ -184,7 +184,7 @@ uint16_t AFHDS2A_RX_callback()
|
||||
if (AFHDS2A_RX_data_ready()) {
|
||||
A7105_ReadData(AFHDS2A_RX_TXPACKET_SIZE);
|
||||
if (memcmp(&packet[1], rx_id, 4) == 0 && memcmp(&packet[5], rx_tx_addr, 4) == 0) {
|
||||
if (packet[0] == 0x58 && packet[37] == 0x00 && telemetry_link == 0) { // standard packet, send channels to TX
|
||||
if (packet[0] == 0x58 && packet[37] == 0x00 && (telemetry_link&0x7F) == 0) { // standard packet, send channels to TX
|
||||
int rssi = min(A7105_ReadReg(A7105_1D_RSSI_THOLD),160);
|
||||
RX_RSSI = map16b(rssi, 160, 8, 0, 128);
|
||||
AFHDS2A_RX_build_telemetry_packet();
|
||||
|
@ -148,7 +148,7 @@ uint16_t BAYANG_RX_callback()
|
||||
case BAYANG_RX_DATA:
|
||||
if (NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_RX_DR)) {
|
||||
if (XN297_ReadPayload(packet, BAYANG_RX_PACKET_SIZE) && packet[0] == 0xA5 && Bayang_Rx_check_validity()) {
|
||||
if (telemetry_link == 0) {
|
||||
if ((telemetry_link & 0x7F) == 0) {
|
||||
Bayang_Rx_build_telemetry_packet();
|
||||
telemetry_link = 1;
|
||||
#if defined (SEND_SBUS_SERIAL) || defined (SEND_CPPM)
|
||||
|
@ -575,7 +575,7 @@ uint16_t FRSKY_RX_callback()
|
||||
FRSKY_RX_set_channel(hopping_frequency_no);
|
||||
if(chanskip_valid)
|
||||
{
|
||||
if (telemetry_link == 0)
|
||||
if ((telemetry_link & 0x7F) == 0)
|
||||
{ // send channels to TX
|
||||
FRSKY_RX_build_telemetry_packet();
|
||||
telemetry_link = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user