From b92d71c8c9fff2b346e9d59f99d50bb5abea72eb Mon Sep 17 00:00:00 2001 From: novirium Date: Sun, 1 May 2022 18:22:17 +0800 Subject: [PATCH] Fix motor control iteration time bug --- src/motor-esp32/motor_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/motor-esp32/motor_control.cpp b/src/motor-esp32/motor_control.cpp index b12b239..9d9668c 100644 --- a/src/motor-esp32/motor_control.cpp +++ b/src/motor-esp32/motor_control.cpp @@ -13,7 +13,7 @@ #include "nvs.h" #include "nvs_flash.h" -#define MC_ITERATION_TIME 1.0 / MOTOR_CONTROL_PERIOD_MS +#define MC_ITERATION_TIME (MOTOR_CONTROL_PERIOD_MS / 1000.0) #define MC_TASK_STACK_SIZE 2048