Example program to demonstrate the use of the GnssSerial class.
Dependencies: gnss
Revision 6:881e2bbf29e4, committed 2017-06-14
- Comitter:
- rob.meades@u-blox.com
- Date:
- Wed Jun 14 20:47:56 2017 +0100
- Parent:
- 5:0a29acdad627
- Child:
- 7:746ae478fdf7
- Commit message:
- Corrections to printf()s and update library version.
Changed in this revision
gnss.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/gnss.lib Wed Jun 14 13:39:16 2017 +0000 +++ b/gnss.lib Wed Jun 14 20:47:56 2017 +0100 @@ -1,1 +1,1 @@ -https://mbed.org/teams/ublox/code/gnss/#af4baf3c67f3 +https://mbed.org/teams/ublox/code/gnss/#56eda66d585b
--- a/main.cpp Wed Jun 14 13:39:16 2017 +0000 +++ b/main.cpp Wed Jun 14 20:47:56 2017 +0100 @@ -31,6 +31,8 @@ * operating correctly, pulse blue when a time reading has been received, * pulse white when GNSS position has been received or turn red if there is * a failure. + * On the C027 and C030 boards the green/red (respectively) LED near the + * GNSS module will flash as the module achieves a fix. */ int main() @@ -69,9 +71,8 @@ ledGreen = 0; printf("\nGNSS: location is %.5f %.5f.\n\n", latitude, longitude); - sprintf(link, "I am here!\n" - "https://maps.google.com/?q=%.5f,%.5f\n", - latitude, longitude); + printf("I am here: https://maps.google.com/?q=%.5f,%.5f\n\n", + latitude, longitude); } } else if (CHECK_TALKER("GGA") || CHECK_TALKER("GNS")) { double altitude = 0; @@ -79,7 +80,7 @@ // Altitude if (gnss.getNmeaItem(9, buffer, length, altitude)) { - printf("\nGNSS: altitude is %.1f m.\n\n", altitude); + printf("\nGNSS: altitude is %.1f m.\n", altitude); } // Time