Skip to content

Commit 2a21229

Browse files
authored
Merge pull request #21847 from LeonardHerbst/origin/motor_driver
drivers/motor_driver: fix accidental braking
2 parents 5d26414 + 1a4491e commit 2a21229

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

drivers/include/motor_driver.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,9 @@
6868
* - CCW (Counter ClockWise)
6969
* and a brake capability
7070
*
71-
* BRAKE LOW is functionally the same than BRAKE HIGH but some H-bridge only
72-
* brake on BRAKE HIGH due to hardware.
73-
* In case of single direction GPIO, there is no BRAKE.
74-
*
75-
* In case of brake, PWM duty cycle is always set to 0.
76-
71+
* Most H-bridges brake in both BRAKE HIGH and BRAKE LOW states,
72+
* but some only support BRAKE HIGH due to hardware
73+
* When breaking the PWM duty cycle is set to 0.
7774
* @{
7875
* @file
7976
* @brief High-level driver for DC motors

drivers/motor_driver/motor_driver.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ int motor_set(const motor_driver_t *motor_driver, uint8_t motor_id, \
168168
switch (motor_driver->params->mode) {
169169
/* Two direction GPIO, handling brake */
170170
case MOTOR_DRIVER_2_DIRS:
171-
_motor_brake_two_dirs(motor, motor_driver->params->brake_inverted);
172171
break;
173172
case MOTOR_DRIVER_1_DIR:
174173
break;

0 commit comments

Comments
 (0)