Small corrections

This commit is contained in:
Pascal Langer
2020-04-07 10:55:54 +02:00
parent 3f652fa06c
commit 4039cbf8af
4 changed files with 25 additions and 2 deletions

View File

@@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 0
#define VERSION_PATCH_LEVEL 83
#define VERSION_PATCH_LEVEL 84
//******************
// Protocols

View File

@@ -1795,7 +1795,7 @@ void update_serial_data()
boolean sport_valid=false;
for(uint8_t i=28;i<28+7;i++)
if(rx_ok_buff[i]!=0) sport_valid=true; //Check that the payload is not full of 0
if(rx_ok_buff[27]&0x1F > 0x1B) //Check 1st byte validity
if((rx_ok_buff[27]&0x1F) > 0x1B) //Check 1st byte validity
sport_valid=false;
if(sport_valid)
{

View File

@@ -172,6 +172,10 @@ void NRF24L01_SetPower()
if(prev_power != power)
{
rf_setup = (rf_setup & 0xF9) | (power << 1);
if(power==3)
rf_setup |=0x01; // Si24r01 full power, unused bit for NRF
else
rf_setup &=0xFE;
NRF24L01_WriteReg(NRF24L01_06_RF_SETUP, rf_setup);
prev_power=power;
}