Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: DeviceBootstrap.cpp
- Revision:
- 95:5dfdc8568e9f
- Parent:
- 93:61d44636f020
- Child:
- 97:9f2de96941c4
--- a/DeviceBootstrap.cpp Wed Apr 22 11:22:25 2015 +0000 +++ b/DeviceBootstrap.cpp Mon Apr 27 10:50:21 2015 +0000 @@ -3,6 +3,7 @@ #include <string.h> #include "DeviceBootstrap.h" #include "rtos.h" +#include "LCDDisplay.h" #include "ComposedRecord.h" #include "CharValue.h" #include "IntegerValue.h" @@ -10,12 +11,11 @@ #include "SmartRestConf.h" #include "logging.h" -DeviceBootstrap::DeviceBootstrap(AbstractSmartRest& client, LCDDisplay& lcdDisplay, +DeviceBootstrap::DeviceBootstrap(AbstractSmartRest& client, DeviceInfo& deviceInfo, DeviceMemory& deviceMemory) : _client(client), _deviceInfo(deviceInfo), - _deviceMemory(deviceMemory), - _lcdDisplay(lcdDisplay) + _deviceMemory(deviceMemory) { *_username = *_password = '\0'; } @@ -60,7 +60,7 @@ // set authorization for bootstrap setAuth(DEVICE_BOOTSTRAP_USERNAME, DEVICE_BOOTSTRAP_PASSWORD); - _lcdDisplay.setLines("Bootstrap", _deviceInfo.imei()); + LCDDisplay::inst().setLines("Bootstrap", _deviceInfo.imei()); uint8_t tries = 255; do { @@ -89,11 +89,11 @@ setCredentials(recvdRecord.value(3).characterValue(), recvdRecord.value(4).characterValue(), recvdRecord.value(5).characterValue()); - _lcdDisplay.setLines("Bootstrap Success", _username, _password); + LCDDisplay::inst().setLines("Bootstrap Success", _username, _password); return true; } while (--tries > 0); - _lcdDisplay.setLines("Bootstrap Failure"); + LCDDisplay::inst().setLines("Bootstrap Failure"); return false; }