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
00001 #include "mbed.h" 00002 #include "GPS.h" 00003 #include "rtos.h" 00004 #include "global.h" 00005 00006 class GpsTask 00007 { 00008 public: 00009 static void run() 00010 { 00011 for (;;) { 00012 //printf("GPS task\r\n"); 00013 if(gps.sample()>2) 00014 { 00015 float lon = gps.get_dec_longitude(); 00016 printf("Sat: %u\r\n", gps.get_satelites()); 00017 printf("%3.2f\r\n", lon); 00018 } 00019 //float lon = gps.get_dec_longitude(); 00020 //printf("Sat: %u\r\n", gps.get_satelites()); 00021 //printf("%3.2f\r\n", lon); 00022 rtos::Thread::wait(250); 00023 } 00024 } 00025 GpsTask() 00026 { 00027 registerThread(GpsTask::run); 00028 //run(); 00029 } 00030 static GPS gps; 00031 }; 00032 GPS GpsTask::gps(P5_4, P5_3); 00033 00034 // some witchcraft to register run function without touching anything outside our library 00035 static GpsTask _dummy;
Generated on Tue Sep 13 2022 05:19:36 by
1.7.2
