1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Added battery cell count based automatic PID profile switching.

This commit is contained in:
mikeller 2019-02-03 14:04:35 +13:00 committed by Michael Keller
parent 90e50c9f48
commit 299d96fdc7
23 changed files with 124 additions and 73 deletions

View file

@ -3329,7 +3329,7 @@ static void cliProfile(char *cmdline)
return;
} else {
const int i = atoi(cmdline);
if (i >= 0 && i < MAX_PROFILE_COUNT) {
if (i >= 0 && i < PID_PROFILE_COUNT) {
changePidProfile(i);
cliProfile("");
}
@ -3352,7 +3352,7 @@ static void cliRateProfile(char *cmdline)
static void cliDumpPidProfile(uint8_t pidProfileIndex, uint8_t dumpMask)
{
if (pidProfileIndex >= MAX_PROFILE_COUNT) {
if (pidProfileIndex >= PID_PROFILE_COUNT) {
// Faulty values
return;
}
@ -4764,7 +4764,7 @@ static void printConfig(char *cmdline, bool doDiff)
dumpAllValues(MASTER_VALUE, dumpMask);
if (dumpMask & DUMP_ALL) {
for (uint32_t pidProfileIndex = 0; pidProfileIndex < MAX_PROFILE_COUNT; pidProfileIndex++) {
for (uint32_t pidProfileIndex = 0; pidProfileIndex < PID_PROFILE_COUNT; pidProfileIndex++) {
cliDumpPidProfile(pidProfileIndex, dumpMask);
}
cliPrintHashLine("restore original profile selection");