FrSkyX: clean up

This commit is contained in:
Pascal Langer 2020-07-05 17:19:29 +02:00
parent 5ab00b9d18
commit adebb3fc5c
2 changed files with 10 additions and 10 deletions

View File

@ -166,15 +166,15 @@ uint16_t ReadFrSkyX()
uint8_t rssi_level=convert_channel_8b(CH16)>>1; //CH16 0..127
if ( rssi > rssi_level && rssi < 128) //test rssi level dynamically
#else
if ( rssi > 14 && rssi < 128) // if RSSI above -65dBm (12=-70) => ETSI requirement
if ( rssi > 14 && rssi < 128) //if RSSI above -65dBm (12=-70) => ETSI requirement
#endif
{
LBT_POWER_on; // Reduce to low power before transmitting
LBT_POWER_on; //Reduce to low power before transmitting
debugln("Busy %d %d",hopping_frequency_no,rssi);
}
}
CC2500_Strobe(CC2500_SIDLE);
CC2500_Strobe(CC2500_SFTX);
CC2500_Strobe(CC2500_SFTX); //Flush the TXFIFO
CC2500_SetTxRxMode(TX_EN);
CC2500_SetPower();
hopping_frequency_no = (hopping_frequency_no+FrSkyX_chanskip)%47;
@ -186,6 +186,7 @@ uint16_t ReadFrSkyX()
return 5200; // FCC
case FRSKY_DATA3:
CC2500_Strobe(CC2500_SIDLE);
CC2500_Strobe(CC2500_SFRX); //Flush the RXFIFO
CC2500_SetTxRxMode(RX_EN);
CC2500_Strobe(CC2500_SRX);
state++;
@ -238,7 +239,6 @@ uint16_t ReadFrSkyX()
else
telemetry_link=1; //Send telemetry out anyway
#endif
CC2500_Strobe(CC2500_SFRX); //Flush the RXFIFO
state = FRSKY_DATA1;
return 400; // FCC & LBT
}

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 1
#define VERSION_PATCH_LEVEL 35
#define VERSION_PATCH_LEVEL 36
//******************
// Protocols