From 4a1e4ebcd60e37edf9cb3de77e9d10402f1f4739 Mon Sep 17 00:00:00 2001 From: Bob Long Date: Tue, 6 Aug 2024 09:21:18 +1000 Subject: [PATCH] RCOutput: initialize _esc_pwm_min and _esc_pwm_max Further protection from potential dangerous behavior when these do not get initialized for some reason. --- libraries/AP_HAL/RCOutput.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL/RCOutput.h b/libraries/AP_HAL/RCOutput.h index 456cab154c6f6..68a84b1a10fcd 100644 --- a/libraries/AP_HAL/RCOutput.h +++ b/libraries/AP_HAL/RCOutput.h @@ -422,6 +422,6 @@ class AP_HAL::RCOutput { void append_to_banner(char banner_msg[], uint8_t banner_msg_len, output_mode out_mode, uint8_t low_ch, uint8_t high_ch) const; const char* get_output_mode_string(enum output_mode out_mode) const; - uint16_t _esc_pwm_min; - uint16_t _esc_pwm_max; + uint16_t _esc_pwm_min = 1000; + uint16_t _esc_pwm_max = 2000; };