kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Log traffic info to SD
rodzic
771cdd3997
commit
95c040b8c3
|
@ -386,7 +386,14 @@ static void ProcessRxPacket(OGN_RxPacket<OGN_Packet> *RxPacket, uint8_t RxPacket
|
|||
{ uint8_t Len=RxPacket->WritePFLAA(Line, Warn, LatDist, LonDist, RxPacket->Packet.DecodeAltitude()-GPS_Altitude/10);
|
||||
xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
|
||||
Format_String(CONS_UART_Write, Line, 0, Len);
|
||||
xSemaphoreGive(CONS_Mutex); }
|
||||
xSemaphoreGive(CONS_Mutex);
|
||||
#ifdef WITH_SDLOG
|
||||
if(Log_Free()>=128)
|
||||
{ xSemaphoreTake(Log_Mutex, portMAX_DELAY);
|
||||
Format_String(Log_Write, Line, 0, Len); // send the NMEA out to the log file
|
||||
xSemaphoreGive(Log_Mutex); }
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef WITH_MAVLINK
|
||||
MAV_ADSB_VEHICLE MAV_RxReport;
|
||||
|
@ -597,13 +604,27 @@ void vTaskPROC(void* pvParameters)
|
|||
if(Parameters.Verbose)
|
||||
{ xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
|
||||
Look.WritePFLA(CONS_UART_Write); // produce PFLAU and PFLAA for all tracked targets
|
||||
xSemaphoreGive(CONS_Mutex); }
|
||||
xSemaphoreGive(CONS_Mutex);
|
||||
#ifdef WITH_SDLOG
|
||||
if(Log_Free()>=512)
|
||||
{ xSemaphoreTake(Log_Mutex, portMAX_DELAY);
|
||||
Look.WritePFLA(Log_Write);
|
||||
xSemaphoreGive(Log_Mutex); }
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
if(Parameters.Verbose)
|
||||
{ uint8_t Len=Look.WritePFLAU(Line); // $PFLAU, overall status
|
||||
xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
|
||||
Format_String(CONS_UART_Write, Line, 0, Len);
|
||||
xSemaphoreGive(CONS_Mutex); }
|
||||
xSemaphoreGive(CONS_Mutex);
|
||||
#ifdef WITH_SDLOG
|
||||
if(Log_Free()>=128)
|
||||
{ xSemaphoreTake(Log_Mutex, portMAX_DELAY);
|
||||
Format_String(Log_Write, Line, 0, Len); // send the NMEA out to the log file
|
||||
xSemaphoreGive(Log_Mutex); }
|
||||
#endif
|
||||
}
|
||||
#endif // WITH_PFLAA
|
||||
uint8_t Warn = 0;
|
||||
if(Tgt) Warn = Tgt->WarnLevel; // what is the warning level ?
|
||||
|
@ -637,7 +658,14 @@ void vTaskPROC(void* pvParameters)
|
|||
{ uint8_t Len=Look.WritePFLAU(Line); // $PFLAU, overall status
|
||||
xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
|
||||
Format_String(CONS_UART_Write, Line, 0, Len);
|
||||
xSemaphoreGive(CONS_Mutex); }
|
||||
xSemaphoreGive(CONS_Mutex);
|
||||
#ifdef WITH_SDLOG
|
||||
if(Log_Free()>=128)
|
||||
{ xSemaphoreTake(Log_Mutex, portMAX_DELAY);
|
||||
Format_String(Log_Write, Line, 0, Len); // send the NMEA out to the log file
|
||||
xSemaphoreGive(Log_Mutex); }
|
||||
#endif
|
||||
}
|
||||
#endif // WITH_LOOKOUT
|
||||
#ifdef WITH_FLASHLOG
|
||||
bool Written=FlashLog_Process(PosPacket.Packet, PosTime);
|
||||
|
|
Ładowanie…
Reference in New Issue