From 94237011be3662bae4dd44ad12fdbe3955f5d8cf Mon Sep 17 00:00:00 2001 From: Johnathon Slightham Date: Tue, 3 Mar 2026 23:26:22 -0500 Subject: [PATCH] Update PID tuning --- main/control/DCMotorActuator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main/control/DCMotorActuator.cpp b/main/control/DCMotorActuator.cpp index 7448edc..c62831e 100644 --- a/main/control/DCMotorActuator.cpp +++ b/main/control/DCMotorActuator.cpp @@ -8,18 +8,19 @@ #include "esp_attr.h" #include "flatbuffers_generated/SensorMessage_generated.h" #include "util/number_utils.h" +#include "esp_log.h" #define LOW_DUTY 200 #define HIGH_DUTY 1000 #define FWD_CHANNEL LEDC_CHANNEL_1 #define REV_CHANNEL LEDC_CHANNEL_0 -#define DEADZONE 0.1 +#define DEADZONE 0.05 #define KP 0.01 #define KI 0 -#define KD 0.015 +#define KD 0.020 #define MIN_PWM_DUTY 675 #define MAX_PWM_DUTY 1024 -#define TICKS_PER_ROTATION 14.0 +#define TICKS_PER_ROTATION 18.0 #define GEAR_RATIO 298 DCMotorActuator::DCMotorActuator() {