kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Minor edits
rodzic
753ae5065b
commit
472c38c381
|
@ -191,7 +191,7 @@ static void ParmForm_GPS(httpd_req_t *Req) // produce HTML form for GPS paramet
|
||||||
httpd_resp_sendstr_chunk(Req, "<div class=\"submit-row\"><input type=\"submit\" value=\"Apply\"></div>\n");
|
httpd_resp_sendstr_chunk(Req, "<div class=\"submit-row\"><input type=\"submit\" value=\"Apply\"></div>\n");
|
||||||
httpd_resp_sendstr_chunk(Req, "</form>\n"); }
|
httpd_resp_sendstr_chunk(Req, "</form>\n"); }
|
||||||
|
|
||||||
static void ParmForm_Other(httpd_req_t *Req) // produce HTML form for aircraft parameters
|
static void ParmForm_Other(httpd_req_t *Req) // produce HTML form for parameters not included in other forms
|
||||||
{ char Line[16]; int Len;
|
{ char Line[16]; int Len;
|
||||||
|
|
||||||
httpd_resp_sendstr_chunk(Req, "<h2>Other</h2>");
|
httpd_resp_sendstr_chunk(Req, "<h2>Other</h2>");
|
||||||
|
|
25
main/ogn.h
25
main/ogn.h
|
@ -672,6 +672,26 @@ class GPS_Time
|
||||||
void setDefaultDate() { Year=00; Month=1; Day=1; } // default Date is 01-JAN-2000
|
void setDefaultDate() { Year=00; Month=1; Day=1; } // default Date is 01-JAN-2000
|
||||||
void setDefaultTime() { Hour=0; Min=0; Sec=0; mSec=0; } // default Time is 00:00:00.00
|
void setDefaultTime() { Hour=0; Min=0; Sec=0; mSec=0; } // default Time is 00:00:00.00
|
||||||
|
|
||||||
|
uint8_t FormatDate(char *Out, char Sep='.') const
|
||||||
|
{ uint8_t Len=0;
|
||||||
|
Len+=Format_UnsDec(Out+Len, Day, 2);
|
||||||
|
Out[Len++]=Sep;
|
||||||
|
Len+=Format_UnsDec(Out+Len, Month, 2);
|
||||||
|
Out[Len++]=Sep;
|
||||||
|
Len+=Format_UnsDec(Out+Len, Year, 2);
|
||||||
|
Out[Len]=0; return Len; }
|
||||||
|
|
||||||
|
uint8_t FormatTime(char *Out, char Sep=':') const
|
||||||
|
{ uint8_t Len=0;
|
||||||
|
Len+=Format_UnsDec(Out+Len, Hour, 2);
|
||||||
|
Out[Len++]=Sep;
|
||||||
|
Len+=Format_UnsDec(Out+Len, Min, 2);
|
||||||
|
Out[Len++]=Sep;
|
||||||
|
Len+=Format_UnsDec(Out+Len, Sec, 2);
|
||||||
|
Out[Len++]='.';
|
||||||
|
Len+=Format_UnsDec(Out+Len, mSec, 3);
|
||||||
|
Out[Len]=0; return Len; }
|
||||||
|
|
||||||
bool isTimeValid(void) const // is the GPS time-of-day valid
|
bool isTimeValid(void) const // is the GPS time-of-day valid
|
||||||
{ return (Hour>=0) && (Min>=0) && (Sec>=0); } // all data must have been correctly read: negative means not correctly read)
|
{ return (Hour>=0) && (Min>=0) && (Sec>=0); } // all data must have been correctly read: negative means not correctly read)
|
||||||
|
|
||||||
|
@ -870,13 +890,14 @@ class GPS_Position: public GPS_Time
|
||||||
{ bool hasGPS :1; // all required GPS information has been supplied (but this is not the GPS lock status)
|
{ bool hasGPS :1; // all required GPS information has been supplied (but this is not the GPS lock status)
|
||||||
bool hasBaro :1; // pressure sensor information: pressure, standard pressure altitude, temperature, humidity
|
bool hasBaro :1; // pressure sensor information: pressure, standard pressure altitude, temperature, humidity
|
||||||
bool hasHum :1; //
|
bool hasHum :1; //
|
||||||
bool isReady :1; // is ready for the following treaement
|
|
||||||
bool Sent :1; // has been transmitted
|
|
||||||
bool hasTime :1; // Time has been supplied
|
bool hasTime :1; // Time has been supplied
|
||||||
|
bool hasDate :1; // Time has been supplied
|
||||||
bool hasRMC :1; // GxRMC has been supplied
|
bool hasRMC :1; // GxRMC has been supplied
|
||||||
bool hasGGA :1; // GxGGA has been supplied
|
bool hasGGA :1; // GxGGA has been supplied
|
||||||
bool hasGSA :1; // GxGSA has been supplied
|
bool hasGSA :1; // GxGSA has been supplied
|
||||||
bool hasGSV :1;
|
bool hasGSV :1;
|
||||||
|
bool isReady :1; // is ready for the following treaement
|
||||||
|
bool Sent :1; // has been transmitted
|
||||||
} ;
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue