FrSky R9: fix sensors telem?

This commit is contained in:
Pascal Langer 2020-07-04 17:50:05 +02:00
parent 7112f58dae
commit 78421748ba
3 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,6 @@ static void __attribute__((unused)) FrSkyR9_build_packet()
packet[20] |= FrSkyX_TX_Seq ; //TX=8 at startup
if ( !(FrSkyX_TX_IN_Seq & 0xF8) )
FrSkyX_TX_Seq = ( FrSkyX_TX_Seq + 1 ) & 0x03 ; // Next iteration send next packet
packet[20] = 0x08; //FrSkyX_TX_Seq=8 at startup
packet[21] = 0x00; // length?
packet[22] = 0x00; // data1?
packet[23] = 0x00; // data2?
@ -177,6 +176,7 @@ uint16_t FrSkyR9_callback()
phase++;
return 7400;
case FRSKYR9_RX2:
telemetry_link=0;
if( (SX1276_ReadReg(SX1276_12_REGIRQFLAGS)&0xF0) == (_BV(SX1276_REGIRQFLAGS_RXDONE) | _BV(SX1276_REGIRQFLAGS_VALIDHEADER)) )
{
if(SX1276_ReadReg(SX1276_13_REGRXNBBYTES)==13)
@ -211,7 +211,7 @@ uint16_t FrSkyR9_callback()
#endif
packet_count=0;
telemetry_lost=1;
telemetry_link=0; //Stop sending telemetry
telemetry_link=0; //Stop sending telemetry
}
CC2500_Strobe(CC2500_SFRX); //Flush the RXFIFO
}

View File

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

View File

@ -463,7 +463,7 @@ bool frsky_process_telemetry(uint8_t *buffer,uint8_t len)
p->payload[i] = buffer[i+7] ;
}
else
p->count = 0 ; // Discard
p->count = 0 ; // Discard
p->valid = true ;
FrSkyX_RX_Seq = ( FrSkyX_RX_Seq + 1 ) & 0x03 ; // Move to next sequence