Skip to content

Commit

Permalink
Send out when address changes for random address mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pjalocha committed Mar 25, 2022
1 parent bdfa3b9 commit 18adc25
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion main/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,17 @@ void FlightProcess(void)
{ if(Parameters.Stealth) RndID_TimeToChange=60; }
else
{ if(RndID_TimeToChange==1)
{ Parameters.Address = GPS_Random^RX_Random; }
{ Parameters.Address = (GPS_Random^RX_Random)&0xFFFFFF;
Parameters.WritePOGNS(Line);
xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
Format_String(CONS_UART_Write, Line);
// Format_String(CONS_UART_Write, "$POGNS,Address=0x");
// Format_Hex(CONS_UART_Write, (uint8_t)(Parameters.Address>>16));
// Format_Hex(CONS_UART_Write, (uint16_t)(Parameters.Address));
// Format_String(CONS_UART_Write, ",AddrType=");
// CONS_UART_Write('0'+Parameters.AddrType);
// Format_String(CONS_UART_Write, "\n");
xSemaphoreGive(CONS_Mutex); }
RndID_TimeToChange--; }
if(PrevInFlight==1 && InFlight==0) RndID_TimeToChange+=20;
}
Expand Down

0 comments on commit 18adc25

Please sign in to comment.