apps/btshell: Add "off" param to "scan" command.

Substitute parameter for "cancel".
This commit is contained in:
Michal Gorecki
2022-08-11 14:47:04 +02:00
committed by Szymon Janc
parent 437b2f7ad9
commit f722d93661
+2 -1
View File
@@ -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"},