Fix beacon carrier staying off after a mid-window CARR→TONE switch

This commit is contained in:
Armel FAUVEAU committed 2026-09-06 23:39:17 +02:00
1 parent 34ea3fd6af
commit d12dbe0bf9
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -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)
{
+1 -1
View File
@@ -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);