portable version of the cumulocity demo
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: DeviceIO.cpp
- Revision:
- 52:8f1370084268
- Parent:
- 47:89ae46d5c466
- Child:
- 55:ed3a2751a2b5
--- a/DeviceIO.cpp Tue Jul 29 17:53:43 2014 +0000 +++ b/DeviceIO.cpp Wed Aug 13 10:55:11 2014 +0000 @@ -1,5 +1,9 @@ #include "DeviceIO.h" +#define DEF "\033[39m" +#define GRE "\033[32m" +#define CYA "\033[36m" + DeviceIO::DeviceIO(GPSI2C& gps) : _gpsTracker(gps), _resetButton(D4), // fire button on arduino app shield @@ -42,12 +46,20 @@ void DeviceIO::lcdPrint(const char *line1, const char *line2, const char *line3) { + printf(GRE "io::lcdPrint" DEF "\r\n"); _lcd.cls(); _lcd.locate(0, 0); + _lcd.printf("%s\n", line1); + printf(GRE "> " CYA "%s\r\n" DEF, line1); + if (line2 != NULL) { _lcd.printf("%s\n", line2); - if (line3 != NULL) + printf(GRE "> " CYA "%s\r\n" DEF, line2); + + if (line3 != NULL) { _lcd.printf("%s\n", line3); + printf(GRE "> " CYA "%s\r\n" DEF, line3); + } } }