You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2022/08/11 12:47:09 UTC

[mynewt-nimble] branch master updated: apps/btshell: Add "off" param to "scan" command. Substitute parameter for "cancel".

This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new f722d936 apps/btshell: Add "off" param to "scan" command. Substitute parameter for "cancel".
f722d936 is described below

commit f722d93661338a464f2941ed79febc3c31114e2d
Author: Michal Gorecki <mi...@codecoup.pl>
AuthorDate: Thu Aug 11 12:46:46 2022 +0200

    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 8b431586..fd75bc02 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"},