Dreamforce 2013 MiniHack Thermostat Challenge - completed code

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

Committer:
ansond
Date:
Mon Nov 11 20:35:49 2013 +0000
Revision:
5:3ab657317bfa
Parent:
0:26c48388f725
updates

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 0:26c48388f725 1 /* Thermostat-Location.h */
ansond 0:26c48388f725 2 /* Copyright (C) 2013 mbed.org, MIT License
ansond 0:26c48388f725 3 *
ansond 0:26c48388f725 4 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ansond 0:26c48388f725 5 * and associated documentation files (the "Software"), to deal in the Software without restriction,
ansond 0:26c48388f725 6 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
ansond 0:26c48388f725 7 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ansond 0:26c48388f725 8 * furnished to do so, subject to the following conditions:
ansond 0:26c48388f725 9 *
ansond 0:26c48388f725 10 * The above copyright notice and this permission notice shall be included in all copies or
ansond 0:26c48388f725 11 * substantial portions of the Software.
ansond 0:26c48388f725 12 *
ansond 0:26c48388f725 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ansond 0:26c48388f725 14 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ansond 0:26c48388f725 15 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ansond 0:26c48388f725 16 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ansond 0:26c48388f725 17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ansond 0:26c48388f725 18 */
ansond 0:26c48388f725 19
ansond 0:26c48388f725 20 #ifndef THERMOSTAT_LOCATION_H_
ansond 0:26c48388f725 21 #define THERMOSTAT_LOCATION_H_
ansond 0:26c48388f725 22
ansond 0:26c48388f725 23 // initialize our location
ansond 0:26c48388f725 24 void Thermostat::initLocation() {
ansond 0:26c48388f725 25 }
ansond 0:26c48388f725 26
ansond 0:26c48388f725 27 // update our location coordinates
ansond 0:26c48388f725 28 void Thermostat::updateCoordinates() {
ansond 0:26c48388f725 29 this->m_latitude = DEFAULT_LATITUDE;
ansond 0:26c48388f725 30 this->m_longitude = DEFAULT_LONGITUDE;
ansond 0:26c48388f725 31
ansond 0:26c48388f725 32 this->display("Location: Latitude:%2.4f Longitude:%2.4f",this->m_latitude,this->m_longitude);
ansond 0:26c48388f725 33 this->display_lcd("Location Coordinates\r\nLatitude: %2.4f\r\nLongitude: %2.4f",this->m_latitude,this->m_longitude);
ansond 0:26c48388f725 34 }
ansond 0:26c48388f725 35
ansond 0:26c48388f725 36 #endif // THERMOSTAT_LOCATION_H_