Skip to content

Commit

Permalink
delay before ebrake gets disengaged, not after
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Sep 23, 2024
1 parent 4169f60 commit 8b343af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion motor-control/firmware/stepper_motor/motor_hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ void MotorHardware::negative_direction() { gpio::reset(pins.direction); }
void MotorHardware::activate_motor() {
gpio::set(pins.enable);
if (pins.ebrake.has_value()) {
gpio::reset(pins.ebrake.value());
// allow time for the motor current to stablize before releasing the
// brake
motor_hardware_delay(20);
gpio::reset(pins.ebrake.value());
}
}
void MotorHardware::deactivate_motor() {
Expand Down

0 comments on commit 8b343af

Please sign in to comment.