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: SoftSerial MAX14690 Buffer
Fork of rtos_threading_with_callback by
gpsTask.cpp
- Committer:
- lwehmeier
- Date:
- 2018-03-30
- Revision:
- 3:d7ec6dc025b0
File content as of revision 3:d7ec6dc025b0:
#include "mbed.h" #include "GPS.h" #include "rtos.h" #include "global.h" class GpsTask { public: static void run() { for (;;) { //printf("GPS task\r\n"); if(gps.sample()>2) { float lon = gps.get_dec_longitude(); printf("Sat: %u\r\n", gps.get_satelites()); printf("%3.2f\r\n", lon); } //float lon = gps.get_dec_longitude(); //printf("Sat: %u\r\n", gps.get_satelites()); //printf("%3.2f\r\n", lon); rtos::Thread::wait(250); } } GpsTask() { registerThread(GpsTask::run); //run(); } static GPS gps; }; GPS GpsTask::gps(P5_4, P5_3); // some witchcraft to register run function without touching anything outside our library static GpsTask _dummy;