From 86a1ca2bcf32b1981daa5527161984c7caa9e7cc Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Mon, 2 Feb 2015 19:58:04 +0100 Subject: [PATCH] OP-1683 - Pulse length must be zeroed at each cycle --- flight/pios/stm32f4xx/pios_servo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/pios/stm32f4xx/pios_servo.c b/flight/pios/stm32f4xx/pios_servo.c index 4eda9eae5..7e66c09e2 100644 --- a/flight/pios/stm32f4xx/pios_servo.c +++ b/flight/pios/stm32f4xx/pios_servo.c @@ -163,9 +163,9 @@ void PIOS_Servo_Update() if (TIM_GetCounter((TIM_TypeDef *)timer) > (uint32_t)(pios_servo_bank_next_update[i] + PIOS_SERVO_SAFE_MARGIN)) { TIM_GenerateEvent((TIM_TypeDef *)timer, TIM_EventSource_Update); pios_servo_bank_next_update[i] = pios_servo_bank_max_pulse[i]; - pios_servo_bank_max_pulse[i] = 0; } } + pios_servo_bank_max_pulse[i] = 0; } for (uint8_t i = 0; (i < servo_cfg->num_channels); i++) { uint8_t bank = pios_servo_pin_bank[i];