From 18adc25573697efe746920bb7a9f55dd278bb77c Mon Sep 17 00:00:00 2001 From: Pawel Jalocha Date: Fri, 25 Mar 2022 18:17:44 +0000 Subject: [PATCH] Send out when address changes for random address mode --- main/gps.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main/gps.cpp b/main/gps.cpp index c3e244b..9f4b80a 100644 --- a/main/gps.cpp +++ b/main/gps.cpp @@ -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; }