kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Send ,SysStart on the console to notify about a (re)start
rodzic
dfb115bffa
commit
0039bdd17c
|
@ -77,14 +77,8 @@ static void PrintParameters(void) // print paramet
|
||||||
xSemaphoreGive(CONS_Mutex); // give back UART1 to other tasks
|
xSemaphoreGive(CONS_Mutex); // give back UART1 to other tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_CONFIG
|
static void PrintPOGNS(void) // print parameters in the $POGNS form
|
||||||
static void ReadParameters(void) // read parameters requested by the user in the NMEA sent.
|
{ xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
|
||||||
{ if((!NMEA.hasCheck()) || NMEA.isChecked() )
|
|
||||||
{ PrintParameters();
|
|
||||||
if(NMEA.Parms==0) // if no parameter given
|
|
||||||
{ xSemaphoreTake(CONS_Mutex, portMAX_DELAY); // print a help message
|
|
||||||
// Format_String(CONS_UART_Write, "$POGNS,<aircraft-type>,<addr-type>,<address>,<RFM69(H)W>,<Tx-power[dBm]>,<freq.corr.[kHz]>,<console baudrate[bps]>,<RF temp. corr.[degC]>,<pressure corr.[Pa]>\n");
|
|
||||||
// Format_String(CONS_UART_Write, "$POGNS[,<Name>=<Value>]\n");
|
|
||||||
Parameters.WritePOGNS(Line);
|
Parameters.WritePOGNS(Line);
|
||||||
Format_String(CONS_UART_Write, Line);
|
Format_String(CONS_UART_Write, Line);
|
||||||
Parameters.WritePOGNS_Pilot(Line);
|
Parameters.WritePOGNS_Pilot(Line);
|
||||||
|
@ -103,6 +97,12 @@ static void ReadParameters(void) // read parameters requested by the user in th
|
||||||
#endif
|
#endif
|
||||||
xSemaphoreGive(CONS_Mutex); //
|
xSemaphoreGive(CONS_Mutex); //
|
||||||
return; }
|
return; }
|
||||||
|
|
||||||
|
#ifdef WITH_CONFIG
|
||||||
|
static void ReadParameters(void) // read parameters requested by the user in the NMEA sent.
|
||||||
|
{ if((!NMEA.hasCheck()) || NMEA.isChecked() )
|
||||||
|
{ PrintParameters();
|
||||||
|
if(NMEA.Parms==0) { PrintPOGNS(); return; } // if no parameter given
|
||||||
Parameters.ReadPOGNS(NMEA);
|
Parameters.ReadPOGNS(NMEA);
|
||||||
PrintParameters();
|
PrintParameters();
|
||||||
esp_err_t Err = Parameters.WriteToNVS(); // erase and write the parameters into the Flash
|
esp_err_t Err = Parameters.WriteToNVS(); // erase and write the parameters into the Flash
|
||||||
|
@ -382,6 +382,15 @@ static void ProcessInput(void)
|
||||||
extern "C"
|
extern "C"
|
||||||
void vTaskCTRL(void* pvParameters)
|
void vTaskCTRL(void* pvParameters)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
uint8_t Len=Format_String(Line, "$POGNS,SysStart");
|
||||||
|
Len+=NMEA_AppendCheckCRNL(Line, Len);
|
||||||
|
Line[Len]=0;
|
||||||
|
xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
|
||||||
|
Format_String(CONS_UART_Write, Line);
|
||||||
|
xSemaphoreGive(CONS_Mutex);
|
||||||
|
PrintPOGNS();
|
||||||
|
|
||||||
uint32_t PrevTime=0;
|
uint32_t PrevTime=0;
|
||||||
GPS_Position *PrevGPS=0;
|
GPS_Position *PrevGPS=0;
|
||||||
for( ; ; ) //
|
for( ; ; ) //
|
||||||
|
|
Ładowanie…
Reference in New Issue