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: http-derived/nmea/http-nmea-ajax.c
- Revision:
- 48:9f1ab7784067
- Child:
- 49:115a5e4fac0c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/http-derived/nmea/http-nmea-ajax.c Wed Mar 27 18:40:21 2019 +0000
@@ -0,0 +1,41 @@
+#include <stdint.h>
+#include <stdio.h>
+
+#include "http.h"
+#include "http-server.h"
+#include "gps.h"
+#include "nmea.h"
+#include "settings.h"
+
+void HttpNmeaAjax()
+{
+ HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
+
+ char text[20];
+ 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(NmeaDop); //33
+ HttpAddInt32AsHex(NmeaSatelliteCount); //41
+ HttpAddInt32AsHex(NmeaFixQuality); //49
+ HttpAddInt32AsHex(GetSensorheight); //57
+
+ HttpAddInt32AsHex(NmeaTimeBucketGetSize()); //65
+ for (int i = 0; i < NmeaTimeBucketGetSize(); i++) //73
+ {
+ HttpAddInt32AsHex(NmeaTimeBucketGetItem(i));
+ }
+}
+