mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Fix debug calculation in motor cycletime
This commit is contained in:
parent
7529db2b5e
commit
a058bb3843
1 changed files with 3 additions and 3 deletions
|
@ -730,10 +730,10 @@ void subTasksMainPidLoop(void) {
|
|||
void taskMotorUpdate(void) {
|
||||
if (debugMode == DEBUG_CYCLETIME) {
|
||||
static uint32_t previousMotorUpdateTime;
|
||||
uint32_t currentDeltaTime = getTaskDeltaTime(TASK_SELF);
|
||||
uint32_t currentDeltaTime = micros() - previousMotorUpdateTime;
|
||||
debug[2] = currentDeltaTime;
|
||||
debug[3] = currentDeltaTime - previousMotorUpdateTime;
|
||||
previousMotorUpdateTime = currentDeltaTime;
|
||||
debug[3] = currentDeltaTime - targetPidLooptime;
|
||||
previousMotorUpdateTime = micros();
|
||||
}
|
||||
|
||||
#ifdef USE_SERVOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue