From 68fd87091c7bf5e0b2715b56f6099355b4cbcbca Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Mon, 9 Aug 2021 21:36:09 +0100 Subject: [PATCH] AP_HAL_ChibiOS: output initializing from PWM banner when not available --- libraries/AP_HAL_ChibiOS/RCOutput.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/RCOutput.cpp b/libraries/AP_HAL_ChibiOS/RCOutput.cpp index a271b80c8a..3f7300b33c 100644 --- a/libraries/AP_HAL_ChibiOS/RCOutput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCOutput.cpp @@ -964,6 +964,11 @@ void RCOutput::set_output_mode(uint16_t mask, const enum output_mode mode) */ bool RCOutput::get_output_mode_banner(char banner_msg[], uint8_t banner_msg_len) const { + if (!hal.scheduler->is_system_initialized()) { + hal.util->snprintf(banner_msg, banner_msg_len, "RCOut: Initialising"); + return true; + } + // create array of each channel's mode output_mode ch_mode[chan_offset + NUM_GROUPS * ARRAY_SIZE(pwm_group::chan)] = {}; bool have_nonzero_modes = false;