Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
276:851554207c77
Parent:
260:fe726583ba1d
--- a/src/ConfigurationHandler/Controls/ManualControl.cpp	Wed Oct 26 20:10:37 2016 +0000
+++ b/src/ConfigurationHandler/Controls/ManualControl.cpp	Wed Oct 26 20:31:39 2016 +0000
@@ -57,6 +57,7 @@
             !cJSON_HasObjectItem(root, "state") ||
             !cJSON_HasObjectItem(root, "percent") ) {
         logError("Manual control is missing expected tags\n");
+        cJSON_Delete(root);
         return false;
     }
 
@@ -68,6 +69,8 @@
     setpoint    = atof(cJSON_GetObjectItem(root, "setpoint")->valuestring);
     state       = atoi(cJSON_GetObjectItem(root, "state")->valuestring);
     percent     = atoi(cJSON_GetObjectItem(root, "percent")->valuestring);
+    
+    cJSON_Delete(root);
 
     return true;
 }