mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-22 08:04:07 +08:00
disarm motor if brake is disarmed
This commit is contained in:
committed by
Samuel Sadok
parent
167f00e622
commit
78bf4a7320
@@ -125,7 +125,7 @@ bool safety_critical_disarm_motor_pwm(Motor& motor) {
|
||||
void safety_critical_apply_motor_pwm_timings(Motor& motor, uint16_t timings[3]) {
|
||||
uint32_t mask = cpu_enter_critical();
|
||||
if (!brake_resistor_armed) {
|
||||
motor.armed_state_ = Motor::ARMED_STATE_ARMED;
|
||||
motor.armed_state_ = Motor::ARMED_STATE_DISARMED;
|
||||
}
|
||||
|
||||
motor.hw_config_.timer->Instance->CCR1 = timings[0];
|
||||
@@ -713,4 +713,4 @@ void pwm_in_cb(int channel, uint32_t timestamp) {
|
||||
last_timestamp[gpio_num - 1] = timestamp;
|
||||
last_pin_state[gpio_num - 1] = current_pin_state;
|
||||
last_sample_valid[gpio_num - 1] = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user