This is an example application based on Mbed-OS LoRaWAN protocol APIs. The Mbed-OS LoRaWAN stack implementation is compliant with LoRaWAN v1.0.2 specification.
Dependencies: Lorawan_Version_0_1
Dependents: Lorawan_Version_0_1
Diff: GPS/GPS.cpp
- Revision:
- 64:85fa08519e1e
- Parent:
- 63:2bfceda4c30c
- Child:
- 66:a11c79073f1f
--- a/GPS/GPS.cpp Wed Dec 11 19:35:25 2019 +0000 +++ b/GPS/GPS.cpp Sat Jan 11 10:36:24 2020 +0000 @@ -28,21 +28,11 @@ _gps.baud(Baud); longitude = 0.0; latitude = 0.0; - _gps.printf("$$PMTK161,1*28\r\n"); //wake up + _gps.printf("$$PMTK161,0*28\r\n"); //sleep + //_gps.printf("$$PMTK161,1*28\r\n"); //wake up } - - - - - - - - - - - - + int GPS::sample() { @@ -53,10 +43,11 @@ for (h = 0; h < 6; h++) { - printf("\n%Try: %i:",h); + printf("\n Try: %i:",h); getline(); + _gps.printf("$$PMTK161,0*28\r\n"); //sleep // Check if it is a GPGGA msg (matches both locked and non-locked msg) //if(sscanf(msg, "GPGGA,%f,%f,%c,%f,%c,%d,%d,%f,%f,%c,%f", &time, &latitude, &ns, &longitude, &ew, &lock, &sats, &hdop, &alt, &unit, &geoid) >= 1) { @@ -83,7 +74,7 @@ //GPGGA,092010.000,5210.9546,N,00008.8913,E,1,07,1.3,9.7,M,47.0,M,,0000*5D //format utc time to beijing time,add 8 time zone - time = time;// + 80000.00f; +// time = time;// + 80000.00f; hour = int(time) / 10000; minute = (int(time) % 10000) / 100; seconed = int(time) % 100; @@ -129,5 +120,5 @@ return; } } - error("Overflowed message limit"); + error("GPS::getline Overflowed message limit"); } \ No newline at end of file