Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
49:0456ee2271be
Parent:
45:3b9e1923cb15
Child:
54:ec1b03064bbd
--- a/src/ModbusMaster/ModbusMaster.cpp	Mon Sep 12 22:19:27 2016 +0000
+++ b/src/ModbusMaster/ModbusMaster.cpp	Tue Sep 13 19:25:13 2016 +0000
@@ -33,19 +33,17 @@
         std::vector<mDot::mdot_file> file_list = GLOBAL_mdot->listUserFiles();
         for (std::vector<mDot::mdot_file>::iterator i = file_list.begin(); i != file_list.end(); ++i) {
 
-            logInfo("(%d)FOUND INPUT FILE: %s", __LINE__, i->name);
-
             if( strncmp( i->name, "input", (strlen("input")-1)) == 0 ) {
 
                 logInfo("(%d)FOUND INPUT FILE: %s", __LINE__, i->name);
 
-                status = GLOBAL_mdot->readUserFile(i->name, (void *)ModbusMasterScratchBuf, 1024);
+                status = GLOBAL_mdot->readUserFile(i->name, ModbusMasterScratchBuf, 1024);
                 if( status != true ) {
                     logInfo("(%d)read file failed, status=%d", __LINE__, status);
                 } else {
                     logInfo("(%d)Read File SUCCESS: %s", __LINE__, ModbusMasterScratchBuf );
                 }
-
+                
                 parse( json_value, ModbusMasterScratchBuf );
 
                 std::string id = json_value["id"].get<std::string>().c_str();
@@ -60,6 +58,7 @@
                 ModbusRegisterMap[id].size = atoi(json_value["size"].get<std::string>().c_str());
                 ModbusRegisterMap[id].order = atoi(json_value["order"].get<std::string>().c_str());
                 ModbusRegisterMap[id].fmt = json_value["fmt"].get<std::string>().c_str();
+                ModbusRegisterMap[id].rfreq = atoi(json_value["rfreq"].get<std::string>().c_str());
             }
         }