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:
- 98:8eab18d03ac2
- Parent:
- 97:5cf6ab71dcd0
- Child:
- 102:715f754cf5a8
--- a/src/CommandParser/cmd.cpp Wed Sep 21 16:17:12 2016 +0000 +++ b/src/CommandParser/cmd.cpp Wed Sep 21 16:27:07 2016 +0000 @@ -427,22 +427,23 @@ *****************************************************************************/ void cmd_createManual(int argc, char **argv) { - if ( argc != 4 ) { - printf("\rusage: create-manual <filename> <output> <state>\n"); - printf("\rexample: create-manual control_mn_1.json o_rly1 1\n"); + if ( argc != 5 ) { + printf("\rusage: create-manual <filename> <id> <output> <state>\n"); + printf("\rexample: create-manual control_mn_1.json man-1 o_rly1 1\r\n"); return; } char data_buf[1024]; snprintf(data_buf, sizeof(data_buf), "{ " - "\"id\": \"%s\", " - "\"type\": \"1\"," + "\"id\": \"%s\", " + "\"output\": \"%s\", " + "\"type\": \"1\", " "\"priority\": \"100\", " - "\"duration\": \"0\", " - "\"setpoint\": \"0\"," - "\"state\": \"%d\"," - "\"percent\": \"100\" ", argv[2], atoi(argv[3]) + "\"duration\": \"0\", " + "\"setpoint\": \"0\", " + "\"state\": \"%d\", " + "\"percent\": \"100\" ", argv[2], argv[3], atoi(argv[4]) ); bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 1024);