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.
Fork of HL_GPS_Example by
Diff: GwoopsGPS.cpp
- Revision:
- 22:9551b2ce17c9
- Parent:
- 21:dfa20810d1d0
--- a/GwoopsGPS.cpp Thu Mar 16 23:10:57 2017 +0000
+++ b/GwoopsGPS.cpp Fri Mar 17 00:11:56 2017 +0000
@@ -66,7 +66,6 @@
rawindex = 0;
clearAllData();
gps = _gps;
- gps->attach(this, &GwoopsGPS::parseCallback, Serial::RxIrq);
valid = 0;
}
@@ -94,12 +93,14 @@
char* GwoopsGPS::getdate() {return date;}
char* GwoopsGPS::getmagvar() {return magvar;}
char GwoopsGPS::getmagvardir() {return magvardir;}
-uint8_t GwoopsGPS::isValid() {return valid;}
+
/**************************************************************************
* MEMBER FUNCTIONS
*************************************************************************/
+uint8_t GwoopsGPS::isValid() {return valid == 'A';}
+
void GwoopsGPS::writeStructToObj(GPRMCSentence *rcrd) {
sprintf(time, "%s", rcrd->time);
status = rcrd->status;
@@ -226,6 +227,15 @@
return;
}
+void GwoopsGPS::init() {
+ gps->attach(this, &GwoopsGPS::parseCallback, Serial::RxIrq);
+ return;
+}
+
+void GwoopsGPS::deinit() {
+ gps->attach(NULL, Serial::RxIrq);
+ return;
+}
@@ -240,3 +250,4 @@
+
