X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fao_cmd.c;h=3f020dc3a3b30a38a97402cb9894a7fa3f35f1ff;hb=359681f23e2f71bc8f4975a4a76ae28c08ecab2e;hp=c738a3e04ab741d4a8148c0bec60c61ae9506204;hpb=a5d60fdb9c969c1516feb76a16001c9688112c4c;p=fw%2Faltos diff --git a/src/ao_cmd.c b/src/ao_cmd.c index c738a3e0..3f020dc3 100644 --- a/src/ao_cmd.c +++ b/src/ao_cmd.c @@ -221,8 +221,6 @@ version(void) printf("software-version %s\n", ao_version); } -static const char help_txt[] = "All numbers are in hex"; - #define NUM_CMDS 11 static __code struct ao_cmds *__xdata (ao_cmds[NUM_CMDS]); @@ -234,7 +232,7 @@ help(void) __xdata uint8_t cmds; __xdata uint8_t cmd; __code struct ao_cmds * __xdata cs; - puts(help_txt); + for (cmds = 0; cmds < ao_ncmds; cmds++) { cs = ao_cmds[cmds]; for (cmd = 0; cs[cmd].func; cmd++) @@ -274,11 +272,6 @@ ao_cmd(void) for (;;) { readline(); -#if HAS_CMD_FILTER - if (ao_cmd_filter()) - continue; - cmd_i = 0; -#endif ao_cmd_lex(); ao_cmd_white(); c = ao_cmd_lex_c; @@ -307,11 +300,11 @@ ao_cmd(void) __xdata struct ao_task ao_cmd_task; __code struct ao_cmds ao_base_cmds[] = { - { help, "?\0Print this message" }, - { ao_task_info, "T\0Show task states" }, - { echo, "E <0 off, 1 on>\0Set command echo mode" }, + { help, "?\0Help" }, + { ao_task_info, "T\0Show tasks" }, + { echo, "E <0 off, 1 on>\0Set echo mode" }, { ao_reboot, "r eboot\0Reboot" }, - { version, "v\0Show version" }, + { version, "v\0Version" }, { 0, NULL }, };