GPS-library with some changes
Dependents: GPSXbee GPSXbee_1_1 GPSXbee_1_0 GPSXbeeCamera_1_0
Fork of GPS by
Revision 6:4e2a078995df, committed 2014-07-04
- Comitter:
- Deurklink
- Date:
- Fri Jul 04 09:51:19 2014 +0000
- Parent:
- 4:85068b8c3f50
- Commit message:
- -
Changed in this revision
GPS.cpp | Show annotated file Show diff for this revision Revisions of this file |
GPS.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/GPS.cpp Mon Mar 10 15:07:58 2014 +0000 +++ b/GPS.cpp Fri Jul 04 09:51:19 2014 +0000 @@ -1,6 +1,19 @@ #include "GPS.h" -GPS::GPS(PinName tx, PinName rx) : _UltimateGps(tx, rx) +GPS::GPS(PinName tx, PinName rx) : + time(0), + hours(0), + minutes(0), + seconds(0), + latitude(0), + longitude(0), + speed(0), + heading(0), + date(0), + fixtype(0), + satellites(0), + altitude(0), + _UltimateGps(tx, rx) { _UltimateGps.baud(9600); } @@ -66,3 +79,13 @@ _UltimateGps.printf("$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n"); wait(1); } + + +bool GPS::readable() +{ + if (_UltimateGps.readable()) + return true; + else + return false; +} + \ No newline at end of file
--- a/GPS.h Mon Mar 10 15:07:58 2014 +0000 +++ b/GPS.h Fri Jul 04 09:51:19 2014 +0000 @@ -28,6 +28,7 @@ GPS(PinName tx, PinName rx); void Init(); int parseData(); + bool readable(); float time; // UTC time int hours; int minutes;