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
http-derived/nmea/http-nmea-ajax.c@48:9f1ab7784067, 2019-03-27 (annotated)
- Committer:
- andrewboyson
- Date:
- Wed Mar 27 18:40:21 2019 +0000
- Revision:
- 48:9f1ab7784067
- Child:
- 49:115a5e4fac0c
Published to allow compiler diagnosis
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| andrewboyson | 48:9f1ab7784067 | 1 | #include <stdint.h> |
| andrewboyson | 48:9f1ab7784067 | 2 | #include <stdio.h> |
| andrewboyson | 48:9f1ab7784067 | 3 | |
| andrewboyson | 48:9f1ab7784067 | 4 | #include "http.h" |
| andrewboyson | 48:9f1ab7784067 | 5 | #include "http-server.h" |
| andrewboyson | 48:9f1ab7784067 | 6 | #include "gps.h" |
| andrewboyson | 48:9f1ab7784067 | 7 | #include "nmea.h" |
| andrewboyson | 48:9f1ab7784067 | 8 | #include "settings.h" |
| andrewboyson | 48:9f1ab7784067 | 9 | |
| andrewboyson | 48:9f1ab7784067 | 10 | void HttpNmeaAjax() |
| andrewboyson | 48:9f1ab7784067 | 11 | { |
| andrewboyson | 48:9f1ab7784067 | 12 | HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL); |
| andrewboyson | 48:9f1ab7784067 | 13 | |
| andrewboyson | 48:9f1ab7784067 | 14 | char text[20]; |
| andrewboyson | 48:9f1ab7784067 | 15 | char nibble; |
| andrewboyson | 48:9f1ab7784067 | 16 | |
| andrewboyson | 48:9f1ab7784067 | 17 | nibble = 0; |
| andrewboyson | 48:9f1ab7784067 | 18 | if (GpsTrace ) nibble |= 1; // 0 |
| andrewboyson | 48:9f1ab7784067 | 19 | if (GpsVerbose ) nibble |= 2; // 0 |
| andrewboyson | 48:9f1ab7784067 | 20 | if (NmeaMsgTrace) nibble |= 4; // 0 |
| andrewboyson | 48:9f1ab7784067 | 21 | if (NmeaCmdTrace) nibble |= 8; // 0 |
| andrewboyson | 48:9f1ab7784067 | 22 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 48:9f1ab7784067 | 23 | |
| andrewboyson | 48:9f1ab7784067 | 24 | HttpAddInt32AsHex(NmeaLatAv); // 1 |
| andrewboyson | 48:9f1ab7784067 | 25 | HttpAddInt32AsHex(NmeaLngAv); // 9 |
| andrewboyson | 48:9f1ab7784067 | 26 | HttpAddInt32AsHex(NmeaHgtAv); //17 |
| andrewboyson | 48:9f1ab7784067 | 27 | |
| andrewboyson | 48:9f1ab7784067 | 28 | HttpAddInt32AsHex(NmeaHeightDevAboveMslAv); //25 |
| andrewboyson | 48:9f1ab7784067 | 29 | |
| andrewboyson | 48:9f1ab7784067 | 30 | HttpAddInt32AsHex(NmeaDop); //33 |
| andrewboyson | 48:9f1ab7784067 | 31 | HttpAddInt32AsHex(NmeaSatelliteCount); //41 |
| andrewboyson | 48:9f1ab7784067 | 32 | HttpAddInt32AsHex(NmeaFixQuality); //49 |
| andrewboyson | 48:9f1ab7784067 | 33 | HttpAddInt32AsHex(GetSensorheight); //57 |
| andrewboyson | 48:9f1ab7784067 | 34 | |
| andrewboyson | 48:9f1ab7784067 | 35 | HttpAddInt32AsHex(NmeaTimeBucketGetSize()); //65 |
| andrewboyson | 48:9f1ab7784067 | 36 | for (int i = 0; i < NmeaTimeBucketGetSize(); i++) //73 |
| andrewboyson | 48:9f1ab7784067 | 37 | { |
| andrewboyson | 48:9f1ab7784067 | 38 | HttpAddInt32AsHex(NmeaTimeBucketGetItem(i)); |
| andrewboyson | 48:9f1ab7784067 | 39 | } |
| andrewboyson | 48:9f1ab7784067 | 40 | } |
| andrewboyson | 48:9f1ab7784067 | 41 |