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: BSP_DISCO_F746NG
Diff: GroveGPS.h
- Revision:
- 3:037ec2b52d31
- Parent:
- 2:82fce70de15f
- Child:
- 4:0ee729b4a211
--- a/GroveGPS.h Tue Jun 04 21:06:20 2019 +0000
+++ b/GroveGPS.h Thu Jun 06 20:17:47 2019 -0500
@@ -18,6 +18,11 @@
} else {
_last_line += newCharacter;
}
+
+ if (_last_line.length() > max_line_length) {
+ error("GPS error - line too long");
+ _last_line = "";
+ }
}
struct GGA {
@@ -70,6 +75,7 @@
private:
+ static const size_t max_line_length = 1024;
std::string _last_line;
Thread serial_thread;
Serial gps_serial;