From 42d8bf352b22b746459efbdf464d361e91197f51 Mon Sep 17 00:00:00 2001 From: BrianQuad <39316832+brianquad@users.noreply.github.com> Date: Thu, 23 Aug 2018 19:34:15 -0600 Subject: [PATCH] Changed Bayang protocol bind to ensure binding only when telemetry and analog aux option selections match on RX and TX --- Multiprotocol/Bayang_nrf24l01.ino | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Multiprotocol/Bayang_nrf24l01.ino b/Multiprotocol/Bayang_nrf24l01.ino index 85bf5bb..9ca216c 100644 --- a/Multiprotocol/Bayang_nrf24l01.ino +++ b/Multiprotocol/Bayang_nrf24l01.ino @@ -53,7 +53,16 @@ static void __attribute__((unused)) BAYANG_send_packet(uint8_t bind) { #ifdef BAYANG_HUB_TELEMETRY if(option & BAYANG_OPTION_FLAG_TELEMETRY) - packet[0]= 0xA3; // telemetry is enabled + if(option & BAYANG_OPTION_FLAG_ANALOGAUX) + packet[0]= 0xA1; // telemetry and analog aux are enabled + else + packet[0]= 0xA3; // telemetry is enabled + else if(option & BAYANG_OPTION_FLAG_ANALOGAUX) + packet[0]= 0xA2; // analog aux is enabled + else + #else + if(option & BAYANG_OPTION_FLAG_ANALOGAUX) + packet[0]= 0xA2; // analog aux is enabled else #endif packet[0]= 0xA4;