Skip to content

Commit

Permalink
fix(motor-control): add delay to give enough time for ebrake to physi…
Browse files Browse the repository at this point in the history
…cally disengage. (#769)
  • Loading branch information
vegano1 authored Apr 16, 2024
1 parent ed0f77e commit fb13acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions motor-control/firmware/stepper_motor/motor_hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit fb13acb

Please sign in to comment.