From 87018b859ee49578af8dab18269c118fc4f78d60 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 7dade31c13..0d1c2d4b98 100644 --- a/libraries/AP_HAL_ChibiOS/RCOutput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCOutput.cpp @@ -961,6 +961,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;