Merge pull request #7519 from mikeller/fix_cli_profile_setting

Fixed range detection for setting of PID / rate profiles in CLI.
This commit is contained in:
Michael Keller 2019-02-04 19:28:45 +13:00 committed by GitHub
commit 7411e10482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -3332,6 +3332,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);
}
}
}
@ -3346,6 +3348,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);
}
}
}