From f722d93661338a464f2941ed79febc3c31114e2d Mon Sep 17 00:00:00 2001 From: Michal Gorecki Date: Thu, 11 Aug 2022 12:46:46 +0200 Subject: [PATCH] apps/btshell: Add "off" param to "scan" command. Substitute parameter for "cancel". --- apps/btshell/src/cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/btshell/src/cmd.c b/apps/btshell/src/cmd.c index 8b4315865..fd75bc02b 100644 --- a/apps/btshell/src/cmd.c +++ b/apps/btshell/src/cmd.c @@ -1209,7 +1209,7 @@ cmd_scan(int argc, char **argv) return rc; } - if (argc > 1 && strcmp(argv[1], "cancel") == 0) { + if (argc > 1 && (strcmp(argv[1], "cancel") == 0 || strcmp(argv[1], "off") == 0)) { rc = btshell_scan_cancel(); if (rc != 0) { console_printf("scan cancel fail: %d\n", rc); @@ -1353,6 +1353,7 @@ cmd_scan(int argc, char **argv) #if MYNEWT_VAL(SHELL_CMD_HELP) static const struct shell_param scan_params[] = { {"cancel", "cancel scan procedure"}, + {"off", "\"cancel\" param substitute"}, {"extended", "usage: =[none|1M|coded|both], default: none"}, {"duration", "usage: =[1-INT32_MAX], default: INT32_MAX"}, {"limited", "usage: =[0-1], default: 0"},