Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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();
