![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: DeviceIntegration.cpp
- Revision:
- 52:8f1370084268
- Parent:
- 49:ac0ba9d54ebc
- Child:
- 55:a0f7295ed6b6
--- a/DeviceIntegration.cpp Tue Jul 29 17:53:43 2014 +0000 +++ b/DeviceIntegration.cpp Wed Aug 13 10:55:11 2014 +0000 @@ -64,25 +64,11 @@ return false; } - puts("Hello."); - if (!deviceExisting()) { - puts("Creating device."); - if (!createDevice()) { - puts("Failed."); - return false; - } - puts("Adding global identifier."); - if (!addGlobalIdentifier()) { - puts("Failed."); - return false; - } - } + if ((!deviceExisting()) && ((!createDevice()) || (!addGlobalIdentifier()))) + return false; - puts("Updating device data."); - if (!updateDevice()) { - puts("Failed."); + if (!updateDevice()) return false; - } return true; }