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
Diff: web-derived/nmea/web-nmea-ajax.c
- Revision:
 - 55:a1bd0572c8b6
 - Parent:
 - 49:115a5e4fac0c
 - Child:
 - 58:3f3e000151cc
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web-derived/nmea/web-nmea-ajax.c	Sun Apr 28 08:31:50 2019 +0000
@@ -0,0 +1,41 @@
+#include  <stdint.h>
+#include   <stdio.h>
+
+#include "http.h"
+#include "web-base.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;                    // 0
+    if (GpsVerbose  ) nibble |= 2;                    // 0
+    if (NmeaMsgTrace) nibble |= 4;                    // 0
+    if (NmeaCmdTrace) nibble |= 8;                    // 0
+    HttpAddNibbleAsHex(nibble);
+    
+    HttpAddInt32AsHex(NmeaLatAv);                     // 1
+    HttpAddInt32AsHex(NmeaLngAv);                     // 9
+    HttpAddInt32AsHex(NmeaHgtAv);                     //17
+
+    HttpAddInt32AsHex(NmeaHeightDevAboveMslAv);       //25
+
+    HttpAddInt32AsHex(NmeaHeightMslAboveWgs);         //33
+    HttpAddInt32AsHex(NmeaDop);                       //41
+    HttpAddInt32AsHex(NmeaSatelliteCount);            //49
+    HttpAddInt32AsHex(NmeaFixQuality);                //57
+    HttpAddInt32AsHex(GetSensorHeight());             //65
+    
+    HttpAddInt32AsHex(NmeaTimeBucketGetSize());       //73
+    for (int i = 0; i < NmeaTimeBucketGetSize(); i++) //81
+    {
+        HttpAddInt32AsHex(NmeaTimeBucketGetItem(i));
+    }
+}
+