Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/CommandParser/cmd.cpp
- Revision:
- 83:0f76cfbb4eba
- Parent:
- 82:f3e495a98877
- Child:
- 88:8a1a2bba8850
--- a/src/CommandParser/cmd.cpp Tue Sep 20 15:35:13 2016 +0000 +++ b/src/CommandParser/cmd.cpp Tue Sep 20 16:21:17 2016 +0000 @@ -35,6 +35,7 @@ #include "ntopt.h" #include "global.h" #include "ConfigurationHandler.h" +#include "ModbusMasterApi.h" #include "OutputTask.h" #include "mDot.h" #include "rtos.h" @@ -716,10 +717,12 @@ { UNUSED(argc); UNUSED(argv); + ModbusValue value; std::map<std::string, ModbusRegister>::iterator iter; for (iter = ModbusRegisterMap.begin(); iter != ModbusRegisterMap.end(); ++iter) { - printf("tag=%s, name=%s, units=%s, node=%d, reg=%d, size=%d, order=%d, value=%2.2f\r\n", iter->first.c_str(), iter->second.name.c_str(), iter->second.units.c_str(), iter->second.node, iter->second.reg, iter->second.size, iter->second.order, iter->second.float_value ); + ModbusMasterReadRegister( iter->first, &value ); + printf("tag=%s, name=%s, units=%s, node=%d, reg=%d, size=%d, order=%d, value=%2.2f\r\n", iter->first.c_str(), iter->second.name.c_str(), iter->second.units.c_str(), iter->second.node, iter->second.reg, iter->second.size, iter->second.order, value.value ); } } @@ -765,8 +768,8 @@ printf("\rusage: sout <output> <value>\r\n"); printf("\rexample: sout o_rly1 1\r\n"); return; - } - ModbusRegisterMap[argv[1]].float_value = value; + } + ModbusMasterWriteRegister( argv[1], value ); } /*****************************************************************************