kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Correct transmission rate error
rodzic
2d8315e757
commit
f8416500a8
|
@ -618,15 +618,19 @@ void vTaskPROC(void* pvParameters)
|
||||||
if(TxBackOff) TxBackOff--;
|
if(TxBackOff) TxBackOff--;
|
||||||
else
|
else
|
||||||
{ RF_TxFIFO.Write(); // complete the write into the TxFIFO
|
{ RF_TxFIFO.Write(); // complete the write into the TxFIFO
|
||||||
TxBackOff = AverSpeed>=10 ? 1 : 3+(RX_Random&0x1); }
|
TxBackOff = AverSpeed>=10 ? 0 : 3+(RX_Random&0x1); }
|
||||||
Position->Sent=1;
|
Position->Sent=1;
|
||||||
#ifdef WITH_FANET
|
#ifdef WITH_FANET
|
||||||
if( (SlotTime&0x07)==(RX_Random&0x07) ) // every 8sec
|
static uint8_t FNTbackOff=0;
|
||||||
|
if(FNTbackOff) FNTbackOff--;
|
||||||
|
// if( (SlotTime&0x07)==(RX_Random&0x07) ) // every 8sec
|
||||||
|
else
|
||||||
{ FANET_Packet *FNTpkt = FNT_TxFIFO.getWrite();
|
{ FANET_Packet *FNTpkt = FNT_TxFIFO.getWrite();
|
||||||
FNTpkt->setAddress(Parameters.Address);
|
FNTpkt->setAddress(Parameters.Address);
|
||||||
Position->EncodeAirPos(*FNTpkt, Parameters.AcftType, !Parameters.Stealth);
|
Position->EncodeAirPos(*FNTpkt, Parameters.AcftType, !Parameters.Stealth);
|
||||||
XorShift32(RX_Random);
|
XorShift32(RX_Random);
|
||||||
FNT_TxFIFO.Write(); }
|
FNT_TxFIFO.Write();
|
||||||
|
FNTbackOff = 8+(RX_Random&0x1); } // every 9 or 10sec
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_LOOKOUT
|
#ifdef WITH_LOOKOUT
|
||||||
const LookOut_Target *Tgt=Look.ProcessOwn(PosPacket.Packet); // process own position, get the most dangerous target
|
const LookOut_Target *Tgt=Look.ProcessOwn(PosPacket.Packet); // process own position, get the most dangerous target
|
||||||
|
|
Ładowanie…
Reference in New Issue