mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 20:48:12 +00:00
Fix AFHDS2A receiver packet filter (#276)
* Add skeleton for AFHDS2A receiver protocol * Bind & data Ok * Send channels to TX via telemetry * Add RSSI * Fix AVR compilation * Fix channel number * Fix packet type check
This commit is contained in:
parent
f3d2ab61e4
commit
032e0641a5
@ -167,7 +167,7 @@ uint16_t AFHDS2A_Rx_callback()
|
||||
if (AFHDS2A_Rx_data_ready()) {
|
||||
A7105_ReadData(AFHDS2A_RX_TXPACKET_SIZE);
|
||||
if (memcmp(&packet[1], rx_id, 4) == 0 && memcmp(&packet[5], rx_tx_addr, 4) == 0) {
|
||||
if (packet[0] = 0x58 && packet[37] == 0x00 && telemetry_link == 0) { // standard packet, send channels to TX
|
||||
if (packet[0] == 0x58 && packet[37] == 0x00 && telemetry_link == 0) { // standard packet, send channels to TX
|
||||
int rssi = min(A7105_ReadReg(A7105_1D_RSSI_THOLD),160);
|
||||
RX_RSSI = map(rssi, 160, 8, 0, 100);
|
||||
AFHDS2A_Rx_build_telemetry_packet();
|
||||
|
Loading…
x
Reference in New Issue
Block a user