Changed Bayang protocol bind to ensure binding only when telemetry and analog aux option selections match on RX and TX

This commit is contained in:
BrianQuad 2018-08-23 19:34:15 -06:00
parent 9c8a5e7120
commit 42d8bf352b

View File

@ -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;