From 3e17e85b3fd1983c105a4ec4a82b24e0c4a8f7ef Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 20 Apr 2026 01:58:26 +0200 Subject: [PATCH] fix(firmware): add timeout to shutdown bye audio wait loop (#7236) --- radio/src/edgetx.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/radio/src/edgetx.cpp b/radio/src/edgetx.cpp index 618e96c51..693ccfdb7 100644 --- a/radio/src/edgetx.cpp +++ b/radio/src/edgetx.cpp @@ -20,6 +20,7 @@ */ #include "os/sleep.h" +#include "os/time.h" #if !defined(SIMU) #include "stm32_ws2812.h" #include "boards/generic_stm32/rgb_leds.h" @@ -1167,7 +1168,12 @@ void edgeTxClose(uint8_t shutdown) storageCheck(true); + uint32_t bye_start = time_get_ms(); while (IS_PLAYING(ID_PLAY_PROMPT_BASE + AU_BYE)) { + if (time_get_ms() - bye_start > 5000/*5s*/) { + TRACE("shutdown: bye audio timeout"); + break; + } sleep_ms(10); }