mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 21:48:12 +00:00
AFHDS2A limit to 12 channels
This commit is contained in:
parent
9015b78aaf
commit
ad18856f7a
@ -177,6 +177,12 @@ static void AFHDS2A_build_packet(uint8_t type)
|
|||||||
packet[0] = 0x58;
|
packet[0] = 0x58;
|
||||||
for(uint8_t ch=0; ch<14; ch++)
|
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]);
|
uint16_t channelMicros = convert_channel_ppm(CH_AETR[ch]);
|
||||||
packet[9 + ch*2] = channelMicros&0xFF;
|
packet[9 + ch*2] = channelMicros&0xFF;
|
||||||
packet[10 + ch*2] = (channelMicros>>8)&0xFF;
|
packet[10 + ch*2] = (channelMicros>>8)&0xFF;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user