From ad18856f7ac6e460a13fc6cee4b7edb4527a56b6 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Fri, 20 Jul 2018 19:11:03 +0200 Subject: [PATCH] AFHDS2A limit to 12 channels --- Multiprotocol/AFHDS2A_a7105.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Multiprotocol/AFHDS2A_a7105.ino b/Multiprotocol/AFHDS2A_a7105.ino index 407045b..774c82b 100644 --- a/Multiprotocol/AFHDS2A_a7105.ino +++ b/Multiprotocol/AFHDS2A_a7105.ino @@ -177,6 +177,12 @@ static void AFHDS2A_build_packet(uint8_t type) packet[0] = 0x58; for(uint8_t ch=0; ch<14; ch++) { + if(ch >= 12) // limit to 12 channels, 14 needs to be tested + { + packet[9 + ch*2] = 0xdc; + packet[10 + ch*2] = 0x05; + continue; + } uint16_t channelMicros = convert_channel_ppm(CH_AETR[ch]); packet[9 + ch*2] = channelMicros&0xFF; packet[10 + ch*2] = (channelMicros>>8)&0xFF;