From 653c26cf997b49a98a0b662de3f35e7d8bdb9d84 Mon Sep 17 00:00:00 2001 From: Hashem Hashem Date: Thu, 25 Jan 2024 13:28:17 +0100 Subject: [PATCH] fix(servo): set neutral PWM before restart This should fix issue where servo sometimes changes position before restarting. Root cause unknown. --- apps/servo/src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/servo/src/main.c b/apps/servo/src/main.c index b15b989b..bba48aca 100644 --- a/apps/servo/src/main.c +++ b/apps/servo/src/main.c @@ -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;