From f0f6f46eebc5b83415670e2b8996e977a3c7aefe Mon Sep 17 00:00:00 2001 From: mikeller Date: Sun, 3 Feb 2019 14:41:35 +1300 Subject: [PATCH] Fixed range detection for setting of PID / rate profiles in CLI. --- src/main/cli/cli.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 57d52ede6d..52bfcc5577 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -3293,6 +3293,8 @@ static void cliProfile(char *cmdline) if (i >= 0 && i < MAX_PROFILE_COUNT) { changePidProfile(i); cliProfile(""); + } else { + cliPrintErrorLinef("PROFILE OUTSIDE OF [0..%d]", MAX_PROFILE_COUNT - 1); } } } @@ -3307,6 +3309,8 @@ static void cliRateProfile(char *cmdline) if (i >= 0 && i < CONTROL_RATE_PROFILE_COUNT) { changeControlRateProfile(i); cliRateProfile(""); + } else { + cliPrintErrorLinef("RATE PROFILE OUTSIDE OF [0..%d]", CONTROL_RATE_PROFILE_COUNT - 1); } } }