From 1e9f2773eae14aba503cf5cb42b7e30e220bad57 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Tue, 4 Jun 2024 17:18:59 +0100 Subject: [PATCH] AP_HAL_ChibiOS: do not include NeoPixel in minimum pulse separation --- libraries/AP_HAL_ChibiOS/RCOutput.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/RCOutput.cpp b/libraries/AP_HAL_ChibiOS/RCOutput.cpp index b3dcf489b6ac04..4d162e3b23a88e 100644 --- a/libraries/AP_HAL_ChibiOS/RCOutput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCOutput.cpp @@ -808,11 +808,9 @@ void RCOutput::push_local(void) #endif // HAL_DSHOT_ENABLED if (group.current_mode == MODE_PWM_ONESHOT || group.current_mode == MODE_PWM_ONESHOT125 || - group.current_mode == MODE_NEOPIXEL || - group.current_mode == MODE_NEOPIXELRGB || - group.current_mode == MODE_PROFILED || is_dshot_protocol(group.current_mode)) { // only control widest pulse for oneshot and dshot + // do not control for neopixel since updates to these are not pushed if (period_us > widest_pulse) { widest_pulse = period_us; } @@ -1133,6 +1131,7 @@ void RCOutput::set_group_mode(pwm_group &group) if (is_bidir_dshot_enabled(group)) { group.dshot_pulse_send_time_us = pulse_send_time_us; // to all intents and purposes the pulse time of send and receive are the same + // for dshot600 this is roughly 26us + 30us + 26us = 82us group.dshot_pulse_time_us = pulse_send_time_us + pulse_send_time_us + 30; } #endif