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