Protocol FrSky D16 receiver (#266)

* Add skeleton for FrSkyX receiver protocol

* Binds & receives data packets

* Store bind information

* Fix compilation

* Bypass LNA since intended usage implies tx & rx are close together

* Bind channel has FS_AUTOCAL

* Add freq fine tune & low power mode (disable lna)

* Add TX ID check

* Retry longer until first packet is catched

* Fix chanskip for first packet

* Fix defines

* Fix bind

* Send channels to TX

* Fix RSSI reading

* Add missing static keyword

* Fix Validate.h

* Fix compilation
This commit is contained in:
goebish
2019-09-17 23:35:19 +02:00
committed by pascallanger
parent 69bdfe3dba
commit 2be2dce584
7 changed files with 371 additions and 4 deletions

View File

@@ -184,6 +184,19 @@ static void multi_send_status()
}
#endif
#ifdef FRSKYX_RX_TELEMETRY
void frskyx_rx_channels_frame()
{
#if defined MULTI_TELEMETRY
multi_send_header(MULTI_TELEMETRY_RX_CHANNELS, 26);
#else
Serial_write(0xAA); // Telemetry packet
#endif
for (uint8_t i = 0; i < 26; i++)
Serial_write(pkt[i]); // pps, rssi, ch start, ch count, 16x ch data
}
#endif
#ifdef AFHDS2A_FW_TELEMETRY
void AFHDSA_short_frame()
{
@@ -1019,6 +1032,15 @@ void TelemetryUpdate()
}
#endif
#if defined FRSKYX_RX_TELEMETRY
if (telemetry_link && protocol == PROTO_FRSKYX_RX)
{
frskyx_rx_channels_frame();
telemetry_link = 0;
return;
}
#endif
if((telemetry_link & 1 )&& protocol != PROTO_FRSKYX)
{ // FrSkyD + Hubsan + AFHDS2A + Bayang + Cabell + Hitec + Bugs + BugsMini + NCC1701
frsky_link_frame();