mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Bugfix for dumping/getting pid controllers in profiles
This commit is contained in:
parent
52868ddc00
commit
7e72d89081
1 changed files with 6 additions and 2 deletions
|
@ -1413,7 +1413,9 @@ static void dumpValues(uint16_t mask)
|
||||||
printf("set %s = ", valueTable[i].name);
|
printf("set %s = ", valueTable[i].name);
|
||||||
|
|
||||||
if (strstr(valueTable[i].name, "pid_controller")) {
|
if (strstr(valueTable[i].name, "pid_controller")) {
|
||||||
cliPrint(pidControllers[*(uint8_t *)valueTable[i].ptr -1]);
|
void *pidPtr= value->ptr;
|
||||||
|
pidPtr= ((uint8_t *)pidPtr) + (sizeof(profile_t) * masterConfig.current_profile_index);
|
||||||
|
cliPrint(pidControllers[*(uint8_t *)pidPtr-1]);
|
||||||
} else {
|
} else {
|
||||||
cliPrintVar(value, 0);
|
cliPrintVar(value, 0);
|
||||||
}
|
}
|
||||||
|
@ -2127,7 +2129,9 @@ static void cliGet(char *cmdline)
|
||||||
printf("%s = ", valueTable[i].name);
|
printf("%s = ", valueTable[i].name);
|
||||||
|
|
||||||
if (strstr(valueTable[i].name, "pid_controller")) {
|
if (strstr(valueTable[i].name, "pid_controller")) {
|
||||||
cliPrint(pidControllers[*(uint8_t *)valueTable[i].ptr - 1]);
|
void *pidPtr= val->ptr;
|
||||||
|
pidPtr= ((uint8_t *)pidPtr) + (sizeof(profile_t) * masterConfig.current_profile_index);
|
||||||
|
cliPrint(pidControllers[*(uint8_t *)pidPtr-1]);
|
||||||
} else {
|
} else {
|
||||||
cliPrintVar(val, 0);
|
cliPrintVar(val, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue