Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
216:7783e894f7e0
Parent:
215:309c73f0fff6
Child:
220:dbe21411f962
--- a/src/CommandParser/cmd.cpp	Tue Oct 11 15:33:40 2016 +0000
+++ b/src/CommandParser/cmd.cpp	Tue Oct 11 17:59:35 2016 +0000
@@ -1658,6 +1658,30 @@
     ModbusMasterMailBox.put(mail);
     
     Thread::wait(5000);
+    
+    snprintf(buf, sizeof(buf),
+             "{ "
+             "\"id\":\"%s\", "
+             "\"tag\":\"%s\", "
+             "\"opl\":\"%s\", "
+             "\"opr\":\"%s\", "
+             "\"op\":\"%s\", "
+             "\"c\":\"%s\" } ", "TEMP_CONV_BDCOND01", "i_cond_temp01", "i_cond_temp01", "", "/", "1000.0");
+             
+    printf("JSON=%s\r\n",buf);
+             
+    rc = GLOBAL_mdot->saveUserFile("vcmd_TEMP_CONV_BDCOND01.json", (void *)buf, MAX_FILE_SIZE);
+    if( rc != true ) {
+        printf("(%d)save file failed, status=%d\r\n", __LINE__, rc);
+    }
+
+    logInfo("Sending Mail To ModbusMasterMailBox, filename=%s", "vcmd_TEMP_CONV_BDCOND01.json");
+    mail = ModbusMasterMailBox.alloc();
+    mail->action = ACTION_READ_FILE;
+    strncpy( mail->controlFile, "vcmd_TEMP_CONV_BDCOND01.json", (sizeof(mail->controlFile)-1));
+    ModbusMasterMailBox.put(mail);
+    
+    Thread::wait(5000);
 
     // OUTPUT: Relay 01
     snprintf(buf, sizeof(buf),