A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

web-this/nmea/web-nmea-query.c

Committer:
andrewboyson
Date:
2020-04-03
Revision:
93:2cce06dd2bcc
Parent:
81:a1de28caf11a

File content as of revision 93:2cce06dd2bcc:

#include     "http.h"
#include "settings.h"
#include "gps.h"

void WebNmeaQuery(char* pQuery)
{
    while (pQuery)
    {
        char* pName;
        char* pValue;
        pQuery = HttpQuerySplit(pQuery, &pName, &pValue);
        
        int value = HttpQueryValueAsInt(pValue);
            
        if (HttpSameStr(pName, "reset"       )) GpsInit();
        if (HttpSameStr(pName, "sensorheight")) SetSensorHeight(value);
        if (HttpSameStr(pName, "nmeamsgtrace")) ChgNmeaMsgTrace();
        if (HttpSameStr(pName, "nmeacmdtrace")) ChgNmeaCmdTrace();
        if (HttpSameStr(pName,     "gpstrace")) ChgGpsTrace();
        if (HttpSameStr(pName,   "gpsverbose")) ChgGpsVerbose();
    }
}