Andrew Boyson / gps

Dependencies:   net lpc1768 crypto clock web log

Committer:
andrewboyson
Date:
Wed May 01 07:45:16 2019 +0000
Revision:
58:3f3e000151cc
Parent:
55:a1bd0572c8b6
Updated web library

Who changed what in which revision?

UserRevisionLine numberNew 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 "gps.h"
andrewboyson 48:9f1ab7784067 6 #include "nmea.h"
andrewboyson 48:9f1ab7784067 7 #include "settings.h"
andrewboyson 48:9f1ab7784067 8
andrewboyson 55:a1bd0572c8b6 9 void WebNmeaAjax()
andrewboyson 48:9f1ab7784067 10 {
andrewboyson 48:9f1ab7784067 11 HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 48:9f1ab7784067 12
andrewboyson 48:9f1ab7784067 13 char nibble;
andrewboyson 48:9f1ab7784067 14
andrewboyson 48:9f1ab7784067 15 nibble = 0;
andrewboyson 48:9f1ab7784067 16 if (GpsTrace ) nibble |= 1; // 0
andrewboyson 48:9f1ab7784067 17 if (GpsVerbose ) nibble |= 2; // 0
andrewboyson 48:9f1ab7784067 18 if (NmeaMsgTrace) nibble |= 4; // 0
andrewboyson 48:9f1ab7784067 19 if (NmeaCmdTrace) nibble |= 8; // 0
andrewboyson 48:9f1ab7784067 20 HttpAddNibbleAsHex(nibble);
andrewboyson 48:9f1ab7784067 21
andrewboyson 48:9f1ab7784067 22 HttpAddInt32AsHex(NmeaLatAv); // 1
andrewboyson 48:9f1ab7784067 23 HttpAddInt32AsHex(NmeaLngAv); // 9
andrewboyson 48:9f1ab7784067 24 HttpAddInt32AsHex(NmeaHgtAv); //17
andrewboyson 48:9f1ab7784067 25
andrewboyson 48:9f1ab7784067 26 HttpAddInt32AsHex(NmeaHeightDevAboveMslAv); //25
andrewboyson 48:9f1ab7784067 27
andrewboyson 49:115a5e4fac0c 28 HttpAddInt32AsHex(NmeaHeightMslAboveWgs); //33
andrewboyson 49:115a5e4fac0c 29 HttpAddInt32AsHex(NmeaDop); //41
andrewboyson 49:115a5e4fac0c 30 HttpAddInt32AsHex(NmeaSatelliteCount); //49
andrewboyson 49:115a5e4fac0c 31 HttpAddInt32AsHex(NmeaFixQuality); //57
andrewboyson 49:115a5e4fac0c 32 HttpAddInt32AsHex(GetSensorHeight()); //65
andrewboyson 48:9f1ab7784067 33
andrewboyson 49:115a5e4fac0c 34 HttpAddInt32AsHex(NmeaTimeBucketGetSize()); //73
andrewboyson 49:115a5e4fac0c 35 for (int i = 0; i < NmeaTimeBucketGetSize(); i++) //81
andrewboyson 48:9f1ab7784067 36 {
andrewboyson 48:9f1ab7784067 37 HttpAddInt32AsHex(NmeaTimeBucketGetItem(i));
andrewboyson 48:9f1ab7784067 38 }
andrewboyson 48:9f1ab7784067 39 }
andrewboyson 48:9f1ab7784067 40