Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: net lpc1768 crypto clock web log
web-this/nmea/web-nmea-ajax.c
- Committer:
- andrewboyson
- Date:
- 2022-06-06
- Revision:
- 100:93f5b732f985
- Parent:
- 60:7cab896b0fd4
File content as of revision 100:93f5b732f985:
#include  <stdint.h>
#include   <stdio.h>
#include "http.h"
#include "gps.h"
#include "nmea.h"
#include "settings.h"
void WebNmeaAjax()
{
    HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
    char nibble;
    
    nibble = 0;
    if (GpsTrace    ) nibble |= 1;
    if (GpsVerbose  ) nibble |= 2;
    if (NmeaMsgTrace) nibble |= 4;
    if (NmeaCmdTrace) nibble |= 8;
    HttpAddNibbleAsHex(nibble                 ); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaLatAv              ); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaLngAv              ); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaHgtAv              ); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaHeightDevAboveMslAv); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaHeightMslAboveWgs  ); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaDop                ); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaSatelliteCount     ); HttpAddChar('\n');
    HttpAddInt32AsHex (NmeaFixQuality         ); HttpAddChar('\n');
    HttpAddInt32AsHex (GetSensorHeight()      ); HttpAddChar('\n');
    HttpAddChar('\f');
    
    HttpAddInt32AsHex (NmeaTimeBucketGetSize()); HttpAddChar('\n');
    for (int i = 0; i < NmeaTimeBucketGetSize(); i++)
    {
        HttpAddInt32AsHex(NmeaTimeBucketGetItem(i)); HttpAddChar('\n');
    }
}