Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: main.cpp
- Revision:
- 98:e369fc75c000
- Parent:
- 97:9f2de96941c4
- Child:
- 100:dbcd3bc51758
--- a/main.cpp Mon Apr 27 13:30:21 2015 +0000 +++ b/main.cpp Thu May 07 09:57:55 2015 +0000 @@ -57,18 +57,12 @@ InterruptIn joystickUp(A2); InterruptIn joystickDown(A3); MDMParser::DevStatus devStatus; - GPSI2C gps; - LCDDisplay::inst().setLines("Mbed Agent V2.1rc2", getHost()); + LCDDisplay::inst().setLines("Mbed Agent V2.1rc2", srHost); if (!mdm.init(SIM_PIN, &devStatus)) { LCDDisplay::inst().setLines("Modem Init Failure", "No SIM card found", "Or SIM has PIN"); mdm.disconnect(); mdm.powerOff(); return 1; - } else if (!gps.init()) { - LCDDisplay::inst().setLines("GPS Init Failure"); - mdm.disconnect(); - mdm.powerOff(); - return 2; } joystickUp.rise(&enableDebug); joystickDown.rise(&disableDebug); @@ -115,7 +109,7 @@ { DeviceInfo deviceInfo(devStatus); - MbedAgent agent(gps, deviceInfo); + MbedAgent agent(deviceInfo); LCDDisplay::inst().setLines("Agent Init"); if (!agent.init()) { @@ -129,7 +123,7 @@ ret = agent.run(); if (ret == 0) { char status[27]; - const char* user= getUsername(); + const char* user= srUsername; int len = strchr(user, '/')-user+sizeof("Tenant: "); len = len <= 27 ? len : 27; snprintf(status, len, "Tenant: %s", user);