Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: main.cpp
- Revision:
- 12:beb64aa0da86
- Parent:
- 8:940c782eec5e
- Child:
- 13:4045b6ac448d
--- a/main.cpp Wed Feb 12 13:40:16 2014 +0000 +++ b/main.cpp Fri Feb 14 12:28:41 2014 +0000 @@ -26,13 +26,18 @@ } // get before starting program as they're permanent - imei(); iccid(); + if (!strlen(imei())) || (!strlen(iccid()))) { + puts("Couldn't read IMEI or ICCID."); + return 2; + } puts("Starting program..."); // restart program upon failure do { ret = program(); + if (ret) + puts("Restarting program..."); } while (ret); modem.disconnect();