From dbe77092b3a32311be8b3ece47cb79579d8c317e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 26 Aug 2023 14:45:18 +1000 Subject: [PATCH] AP_Periph: fixed macos build --- Tools/AP_Periph/rc_out.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/AP_Periph/rc_out.cpp b/Tools/AP_Periph/rc_out.cpp index ff2e6fc9fe1f13..a803d798dbc074 100644 --- a/Tools/AP_Periph/rc_out.cpp +++ b/Tools/AP_Periph/rc_out.cpp @@ -132,7 +132,8 @@ void AP_Periph_FW::rcout_update() const bool has_esc_rawcommand_timed_out = esc_timeout_ms != 0 && ((now_ms - last_esc_raw_command_ms) >= esc_timeout_ms); if (last_esc_num_channels > 0 && has_esc_rawcommand_timed_out) { // If we've seen ESCs previously, and a timeout has occurred, then zero the outputs - int16_t esc_output[last_esc_num_channels] {}; + int16_t esc_output[last_esc_num_channels]; + memset(esc_output, 0, sizeof(esc_output)); rcout_esc(esc_output, last_esc_num_channels); // register that the output has been changed