mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-10 01:38:11 +00:00
Bayang RX: fix warnings
This commit is contained in:
parent
5bd95f8414
commit
cf4acc1d4c
@ -71,17 +71,17 @@ static void __attribute__((unused)) Bayang_Rx_build_telemetry_packet()
|
|||||||
|
|
||||||
// convert & pack channels
|
// convert & pack channels
|
||||||
for (uint8_t i = 0; i < packet_in[3]; i++) {
|
for (uint8_t i = 0; i < packet_in[3]; i++) {
|
||||||
uint32_t val = 0;
|
uint32_t val = CHANNEL_MIN_125;
|
||||||
if (i < 4) {
|
if (i < 4) {
|
||||||
// AETR
|
// AETR
|
||||||
val = (((packet[4 + i * 2] & ~0x7C) << 8) | packet[5 + i * 2]) << 1;
|
val = (((packet[4 + i * 2] & ~0x7C) << 8) | packet[5 + i * 2]) << 1;
|
||||||
}
|
}
|
||||||
else if ((i == 4) && (packet[2] & 0x08) || // flip
|
else if (((i == 4) && (packet[2] & 0x08)) || // flip
|
||||||
(i == 5) && (packet[2] & 0x01) || // rth
|
((i == 5) && (packet[2] & 0x01)) || // rth
|
||||||
(i == 6) && (packet[2] & 0x20) || // picture
|
((i == 6) && (packet[2] & 0x20)) || // picture
|
||||||
(i == 7) && (packet[2] & 0x10)) { // video
|
((i == 7) && (packet[2] & 0x10))) { // video
|
||||||
// set channel to 100% if feature is enabled
|
// set channel to 100% if feature is enabled
|
||||||
val = 2047;
|
val = CHANNEL_MAX_125;
|
||||||
}
|
}
|
||||||
bits |= val << bitsavailable;
|
bits |= val << bitsavailable;
|
||||||
bitsavailable += 11;
|
bitsavailable += 11;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user