Andrew Boyson / gps

Dependencies:   net lpc1768 crypto clock web log

Committer:
andrewboyson
Date:
Mon Jun 06 11:10:58 2022 +0000
Revision:
100:93f5b732f985
Parent:
60:7cab896b0fd4
Publishing prior to moving to new online compiler

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 60:7cab896b0fd4 16 if (GpsTrace ) nibble |= 1;
andrewboyson 60:7cab896b0fd4 17 if (GpsVerbose ) nibble |= 2;
andrewboyson 60:7cab896b0fd4 18 if (NmeaMsgTrace) nibble |= 4;
andrewboyson 60:7cab896b0fd4 19 if (NmeaCmdTrace) nibble |= 8;
andrewboyson 60:7cab896b0fd4 20 HttpAddNibbleAsHex(nibble ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 21 HttpAddInt32AsHex (NmeaLatAv ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 22 HttpAddInt32AsHex (NmeaLngAv ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 23 HttpAddInt32AsHex (NmeaHgtAv ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 24 HttpAddInt32AsHex (NmeaHeightDevAboveMslAv); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 25 HttpAddInt32AsHex (NmeaHeightMslAboveWgs ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 26 HttpAddInt32AsHex (NmeaDop ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 27 HttpAddInt32AsHex (NmeaSatelliteCount ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 28 HttpAddInt32AsHex (NmeaFixQuality ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 29 HttpAddInt32AsHex (GetSensorHeight() ); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 30 HttpAddChar('\f');
andrewboyson 48:9f1ab7784067 31
andrewboyson 60:7cab896b0fd4 32 HttpAddInt32AsHex (NmeaTimeBucketGetSize()); HttpAddChar('\n');
andrewboyson 60:7cab896b0fd4 33 for (int i = 0; i < NmeaTimeBucketGetSize(); i++)
andrewboyson 48:9f1ab7784067 34 {
andrewboyson 60:7cab896b0fd4 35 HttpAddInt32AsHex(NmeaTimeBucketGetItem(i)); HttpAddChar('\n');
andrewboyson 48:9f1ab7784067 36 }
andrewboyson 48:9f1ab7784067 37 }
andrewboyson 48:9f1ab7784067 38