Fixed range detection for setting of PID / rate profiles in CLI.

This commit is contained in:
mikeller 2019-02-03 14:41:35 +13:00
parent 5a1c0769e7
commit f0f6f46eeb
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}
}
}