kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Store the flight state in the GPS structure
rodzic
12bf810436
commit
6b5024970a
|
@ -117,7 +117,7 @@ static uint32_t RndID_TimeToChange = 0;
|
|||
void FlightProcess(void)
|
||||
{ bool PrevInFlight=Flight.inFlight();
|
||||
Flight.Process(GPS_Pos[GPS_PosIdx]);
|
||||
bool InFlight=Flight.inFlight();
|
||||
GPS.InFlight=Flight.inFlight();
|
||||
if(Parameters.AddrType!=0) return;
|
||||
uint32_t Random = GPS_Random^RX_Random;
|
||||
if(RndID_TimeToChange==0)
|
||||
|
@ -136,7 +136,7 @@ void FlightProcess(void)
|
|||
// Format_String(CONS_UART_Write, "\n");
|
||||
xSemaphoreGive(CONS_Mutex); }
|
||||
RndID_TimeToChange--; }
|
||||
if(PrevInFlight==1 && InFlight==0) RndID_TimeToChange+=20;
|
||||
if(PrevInFlight==1 && GPS.InFlight==0) RndID_TimeToChange+=20;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
@ -898,6 +898,7 @@ class GPS_Position: public GPS_Time
|
|||
bool hasGSV :1;
|
||||
bool isReady :1; // is ready for the following treaement
|
||||
bool Sent :1; // has been transmitted
|
||||
bool InFlight :1; // take-off and landing detection
|
||||
} ;
|
||||
} ;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue