Skip to content

Commit

Permalink
fix(servo): set neutral PWM before restart
Browse files Browse the repository at this point in the history
This should fix issue where servo sometimes changes position before
restarting. Root cause unknown.
  • Loading branch information
hashemmm96 committed Jan 25, 2024
1 parent b2eb652 commit 653c26c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/servo/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ ck_err_t set_action_mode(ck_action_mode_t mode) {
// This delay is there because otherwise error frames will be generated on
// the CAN bus. The root cause is still unknown.
vTaskDelay(pdMS_TO_TICKS(10));
pwm_set_pulse(PWM_NEUTRAL_PULSE_MUS);
HAL_NVIC_SystemReset();
}
return CK_OK;
Expand Down

0 comments on commit 653c26c

Please sign in to comment.