DreamForce 2013 Hands-On Demo

Dependencies:   C12832_lcd EthernetInterface-ansond-patched HTTPClient-thermostat-remotes LM75B MMA7660 SocketIO WebSocketClient-ThermostatDemo mbed-rtos mbed picojson

Fork of ThermostatHandsOn by Doug Anson

Revision:
1:dfd24f608038
Parent:
0:6b56785dd2b6
Child:
2:be42baea4c81
--- a/Thermostat.cpp	Thu Oct 17 18:58:54 2013 +0000
+++ b/Thermostat.cpp	Thu Oct 17 20:25:14 2013 +0000
@@ -83,6 +83,9 @@
 // Include Base Utils
 #include "Thermostat-BaseUtils.h"
 
+// Include Location Stubs
+#include "Thermostat-Location.h"
+
 // Default constructor
 Thermostat::Thermostat() {
     this->m_temperature = 0.0;
@@ -332,16 +335,17 @@
 
 // main loop
 void Thermostat::mainLoop() {
+    // initialize our location
+    this->initLocation(); 
+    
+    // begin the main loop
     while(true) {
         // sleep for a bit
         checkForExit();
         wait(DEFAULT_MAIN_LOOP_WAIT);
         
         // announce our position
-        this->m_latitude = DEFAULT_LATITUDE;
-        this->m_longitude = DEFAULT_LONGITUDE;
-        this->display("Location: Latitude:%2.4f Longitude:%2.4f",this->m_latitude,this->m_longitude);
-        this->display_lcd("Location Coordinates\r\nLatitude: %2.4f\r\nLongitude: %2.4f",this->m_latitude,this->m_longitude);
+        this->updateCoordinates();
                 
         // check and react to the joystick button press
         if (joystick_pressed) {