From d32a26e1ea9799c770c5072e0b86f3a2bb3b06dd Mon Sep 17 00:00:00 2001 From: vegano1 Date: Tue, 16 Apr 2024 15:01:14 -0400 Subject: [PATCH] fix(motor-control): add delay to give enough time for ebrake to physically disengage. --- motor-control/firmware/stepper_motor/motor_hardware.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/motor-control/firmware/stepper_motor/motor_hardware.cpp b/motor-control/firmware/stepper_motor/motor_hardware.cpp index 225ff7b90..7cee57b34 100644 --- a/motor-control/firmware/stepper_motor/motor_hardware.cpp +++ b/motor-control/firmware/stepper_motor/motor_hardware.cpp @@ -18,14 +18,14 @@ void MotorHardware::activate_motor() { gpio::set(pins.enable); if (pins.ebrake.has_value()) { gpio::reset(pins.ebrake.value()); + motor_hardware_delay(20); } } void MotorHardware::deactivate_motor() { if (pins.ebrake.has_value()) { gpio::set(pins.ebrake.value()); - motor_hardware_delay(10); + motor_hardware_delay(20); } - motor_hardware_delay(10); gpio::reset(pins.enable); } void MotorHardware::start_timer_interrupt() {