portable version of the cumulocity demo

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Revision:
33:b7d7e6fc421e
Parent:
32:56804dd00193
Child:
34:8a0556f39161
--- a/main.cpp	Wed May 28 17:51:12 2014 +0000
+++ b/main.cpp	Thu Jun 12 14:33:04 2014 +0000
@@ -19,6 +19,7 @@
     puts("IO initialized.");
 
     MDMSerial mdm;
+    mdm.setDebug(4);
     pMdm = &mdm;
 
     if (!mdm.init(NULL, &devStatus)) {
@@ -125,7 +126,8 @@
 
     if (res < 0)
         return false;
-
+        
+    buf[res] = '\0';
     if ((ptr = strchr(buf, '\n')) == NULL)
         return false;
     *ptr = '\0';