endpoint C207 radio support

Dependents:   mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular

Revision:
6:cd2d23300f05
Parent:
5:a8fd1fa0f0d0
Child:
7:948040230536
--- a/MBEDUbloxGPS.cpp	Mon Mar 31 18:47:26 2014 +0000
+++ b/MBEDUbloxGPS.cpp	Tue Apr 01 03:19:55 2014 +0000
@@ -24,10 +24,11 @@
  
  // our instance
  MBEDUbloxGPS *_ublox_gps_instance = NULL;
+ bool _ublox_gps_loop = true;
  
  // threaded task
  static void read_gps(void const *args) {
-    while (_ublox_gps_instance != NULL) {
+    while (_ublox_gps_loop == true && _ublox_gps_instance != NULL) {
         _ublox_gps_instance->update();
         wait_ms(UBLOX_GPS_POLL_MS);
     }
@@ -94,6 +95,9 @@
      this->logger()->log("GPS: Output: %s",out);
  }
  
+ // halt the update thread and disconnect
+ bool MBEDUbloxGPS::disconnect() { _ublox_gps_loop = false; }
+ 
  // get latitude
  float MBEDUbloxGPS::getLatitude() { return this->m_latitude; }