Fix: restore green RX LED after un-muting during a QSO

The mute flash forced the green LED off; on un-mute it was blanked instead of
restored, so a call in progress stayed dark. Restore green from the current RX
state (active DMR slot, or FM/digital signal received) on un-mute; the normal RX
code keeps it correct afterwards.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marcus Kida 2026-07-10 13:46:51 +02:00
parent 35ba6e9975
commit 8fcfb66893
2 changed files with 13 additions and 2 deletions

View file

@ -7,6 +7,10 @@ single running list until the first versioned release.
## Unreleased
- **Fix:** un-muting during an active QSO left the LED **off** instead of returning
to **green**. On un-mute the green RX LED is now restored from the current receive
state (active DMR slot or FM/digital signal), so an in-progress call lights green
again.
- **`MANUAL.md`** — a user-facing feature & usage guide covering both inherited
OpenGD77 features and FreeTRX additions, each tagged 🟢 [FreeTRX] or ⚪
[OpenGD77]. Includes the spectrum scope (VFO sweep, hold `#`), channel add/delete,

View file

@ -39,6 +39,7 @@
#include "io/Leds.h"
#include "interfaces/adc.h"
#include "hardware/radioHardwareInterface.h"
#include "hardware/HR-C6000.h" // slotState, for restoring the green RX LED after unmute
#include "io/buttons.h"
#include "usb/usb_com.h"
@ -1447,9 +1448,15 @@ void applicationMainTask(void)
}
else if (muteFlashActive)
{
// Just unmuted: release our forced LED state.
// Just unmuted: stop the red flash and restore the green LED to the
// current RX state, so a QSO in progress lights green again instead of
// staying dark. Green is normally lit for an active DMR slot (matching
// our filter) or a received FM/digital signal; if nothing is being
// received it stays off. The normal RX code then keeps it correct.
bool rxGreen = (slotState == DMR_STATE_RX_1) || (slotState == DMR_STATE_RX_2) ||
currentRadioDevice->analogSignalReceived || currentRadioDevice->digitalSignalReceived;
LedWrite(LED_RED, 0);
LedWrite(LED_GREEN, 0);
LedWrite(LED_GREEN, (rxGreen ? 1 : 0));
muteFlashActive = false;
}
}