application: offer global busvoodoo commands

This commit is contained in:
King Kévin 2018-01-22 21:43:09 +01:00
parent 5b57060802
commit edf1a9e59c
1 changed files with 5 additions and 2 deletions

View File

@ -135,6 +135,7 @@ static void command_help(void* argument)
(void)argument; // we won't use the argument
printf("available commands:\n");
menu_print_commands(menu_commands, LENGTH(menu_commands)); // print global commands
menu_print_commands(busvoodoo_global_commands, LENGTH(busvoodoo_global_commands)); // print BusVoodoo global commands
menu_print_commands(busvoodoo_hiz_commands, LENGTH(busvoodoo_hiz_commands)); // print BusVoodoo HiZ commands
}
@ -191,8 +192,10 @@ static void process_command(char* str)
}
// handle user input
if (!menu_handle_command(str, busvoodoo_hiz_commands, LENGTH(busvoodoo_hiz_commands))) {
if (!menu_handle_command(str, menu_commands, LENGTH(menu_commands))) {
printf("command not recognized. enter help to list commands\n");
if (!menu_handle_command(str, busvoodoo_global_commands, LENGTH(busvoodoo_global_commands))) {
if (!menu_handle_command(str, menu_commands, LENGTH(menu_commands))) {
printf("command not recognized. enter help to list commands\n");
}
}
}
}