From d12dbe0bf980b58039583cca88a223b6c2a9a49a Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Sun, 6 Sep 2026 23:39:17 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20beacon=20carrier=20staying=20off=20after?= =?UTF-8?q?=20a=20mid-window=20CARR=E2=86=92TONE=20switch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/app/foxhunt.c | 5 +++-- App/apps/beacon/beacon_app.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/App/app/foxhunt.c b/App/app/foxhunt.c index f80dec65..de16abe3 100644 --- a/App/app/foxhunt.c +++ b/App/app/foxhunt.c @@ -960,8 +960,9 @@ static uint8_t FOXHUNT_MorseByte(char c) static void FOXHUNT_KeyOn(void) { BK4819_ExitTxMute(); - if (beaconCarrierKeyed) - BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_PA_ENABLE, true); + // Assert the carrier in both modes: a no-op in TONE (already up), but it re-arms the PA + // if the mode was switched from CARR mid-window while the carrier happened to be down. + BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_PA_ENABLE, true); } static void FOXHUNT_KeyOff(void) { diff --git a/App/apps/beacon/beacon_app.c b/App/apps/beacon/beacon_app.c index b1567aac..4e2d9de1 100644 --- a/App/apps/beacon/beacon_app.c +++ b/App/apps/beacon/beacon_app.c @@ -223,7 +223,7 @@ static bool txDelay(uint16_t ms){ } /* Keying: both modes key the tone; CARR gates the PA in lockstep so the carrier is truly * gone between elements (tone muted too, else it bleeds through residual PA leakage). */ -static void keyOn(void){ A->tx_mute(false); if(carrier) A->tx_carrier(true); } +static void keyOn(void){ A->tx_mute(false); A->tx_carrier(true); } /* carrier up both modes; re-arms after a mid-window switch */ static void keyOff(void){ A->tx_mute(true); if(carrier) A->tx_carrier(false); } static bool morseChar(char c,uint8_t vis){ uint8_t code=morseByte(c);