mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Small fix to dumping of values from CLI on F4
This commit is contained in:
parent
e666f10e84
commit
df5e79d74e
1 changed files with 9 additions and 5 deletions
|
@ -1904,7 +1904,7 @@ static void dumpValues(uint16_t valueSection)
|
||||||
cliPrint("\r\n");
|
cliPrint("\r\n");
|
||||||
|
|
||||||
#ifdef STM32F4
|
#ifdef STM32F4
|
||||||
delayMicroseconds(1000);
|
delay(2);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2717,6 +2717,10 @@ static void cliSet(char *cmdline)
|
||||||
cliPrintf("%s = ", valueTable[i].name);
|
cliPrintf("%s = ", valueTable[i].name);
|
||||||
cliPrintVar(val, len); // when len is 1 (when * is passed as argument), it will print min/max values as well, for gui
|
cliPrintVar(val, len); // when len is 1 (when * is passed as argument), it will print min/max values as well, for gui
|
||||||
cliPrint("\r\n");
|
cliPrint("\r\n");
|
||||||
|
|
||||||
|
#ifdef STM32F4
|
||||||
|
delay(2);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else if ((eqptr = strstr(cmdline, "=")) != NULL) {
|
} else if ((eqptr = strstr(cmdline, "=")) != NULL) {
|
||||||
// has equals
|
// has equals
|
||||||
|
@ -2891,14 +2895,14 @@ static void cliTasks(char *cmdline)
|
||||||
subTaskFrequency = (uint16_t)(1.0f / ((float)cycleTime * 0.000001f));
|
subTaskFrequency = (uint16_t)(1.0f / ((float)cycleTime * 0.000001f));
|
||||||
if (masterConfig.pid_process_denom > 1) {
|
if (masterConfig.pid_process_denom > 1) {
|
||||||
taskFrequency = subTaskFrequency / masterConfig.pid_process_denom;
|
taskFrequency = subTaskFrequency / masterConfig.pid_process_denom;
|
||||||
cliPrintf("%d - (%s) ", taskId, taskInfo.taskName);
|
cliPrintf("%02d - (%s) ", taskId, taskInfo.taskName);
|
||||||
} else {
|
} else {
|
||||||
taskFrequency = subTaskFrequency;
|
taskFrequency = subTaskFrequency;
|
||||||
cliPrintf("%d - (%s/%s) ", taskId, taskInfo.subTaskName, taskInfo.taskName);
|
cliPrintf("%02d - (%s/%s) ", taskId, taskInfo.subTaskName, taskInfo.taskName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
taskFrequency = (uint16_t)(1.0f / ((float)taskInfo.latestDeltaTime * 0.000001f));
|
taskFrequency = (uint16_t)(1.0f / ((float)taskInfo.latestDeltaTime * 0.000001f));
|
||||||
cliPrintf("%d - (%s) ", taskId, taskInfo.taskName);
|
cliPrintf("%02d - (%s) ", taskId, taskInfo.taskName);
|
||||||
}
|
}
|
||||||
|
|
||||||
cliPrintf("max: %dus, avg: %dus, rate: %dhz, total: ", taskInfo.maxExecutionTime, taskInfo.averageExecutionTime, taskFrequency);
|
cliPrintf("max: %dus, avg: %dus, rate: %dhz, total: ", taskInfo.maxExecutionTime, taskInfo.averageExecutionTime, taskFrequency);
|
||||||
|
@ -2909,7 +2913,7 @@ static void cliTasks(char *cmdline)
|
||||||
cliPrintf("%dms", taskTotalTime);
|
cliPrintf("%dms", taskTotalTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (taskId == TASK_GYROPID && masterConfig.pid_process_denom > 1) cliPrintf("\r\n- - (%s) rate: %dhz", taskInfo.subTaskName, subTaskFrequency);
|
if (taskId == TASK_GYROPID && masterConfig.pid_process_denom > 1) cliPrintf("\r\n - - (%s) rate: %dhz", taskInfo.subTaskName, subTaskFrequency);
|
||||||
cliPrintf("\r\n", taskTotalTime);
|
cliPrintf("\r\n", taskTotalTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue