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
Diff: Thermostat-BaseUtils.h
- Revision:
- 1:3faa003ad6e6
- Parent:
- 0:26c48388f725
--- a/Thermostat-BaseUtils.h Tue Nov 05 21:31:01 2013 +0000 +++ b/Thermostat-BaseUtils.h Tue Nov 05 22:10:30 2013 +0000 @@ -65,4 +65,15 @@ this->logMessage(true); } +// display text message output +void Thermostat::displayTextMessage(const char *format, ...) { + memset(this->m_display_message,'\0',MAX_MESSAGE_LENGTH+1); + va_list args; + va_start(args, format); + vsprintf(this->m_display_message, format, args); + va_end(args); + this->logMessage(true); + wait_ms(3000); // add wait state so that we can see the message! +} + #endif // THERMOSTAT_BASEUTILS_H_