Power-on indicator: flash the green LED while the screen is dark
When the display doesn't stay lit — any backlight mode where the screen goes dark, including "None" — the green LED now flashes for 100 ms every 3 s, so a dark screen doesn't leave you wondering whether the radio is still switched on. The flash stands down whenever the LEDs are already in use: while receiving (DMR slot RX or an analog/digital signal), while transmitting, and while muted (which flashes the red LED instead). On standing down it restores the green LED to the current RX state, matching the existing mute-indicator handling. Writes go through LedWrite(), so the CPS "all LEDs disabled" option still applies. Docs (README, MANUAL, CHANGELOG) updated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCK7s3WnwRHZNtQLdyyWBu
This commit is contained in:
parent
090dcecde8
commit
70ff8e55ba
4 changed files with 47 additions and 1 deletions
|
|
@ -7,7 +7,11 @@ single running list until the first versioned release.
|
|||
|
||||
## Unreleased
|
||||
|
||||
_Nothing yet._
|
||||
- **Power-on indicator** — when the display doesn't stay lit (any backlight mode
|
||||
where the screen goes dark, including **None**), the green LED flashes for
|
||||
**100 ms every 3 s** so it's obvious the radio is still switched on. The flash
|
||||
pauses whenever the LEDs are already in use: while receiving, while
|
||||
transmitting, and while muted (which flashes the red LED instead).
|
||||
|
||||
## 0.12.0
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@ fixed. Every element (S-meter, frequencies, menus) follows the selected theme.
|
|||
### Mute indicator — 🟢 [FreeTRX]
|
||||
While muted, the **red LED flashes** (0.5 s every 2 s). See *Mute* below.
|
||||
|
||||
### Power-on indicator — 🟢 [FreeTRX]
|
||||
Whenever the backlight is off — any backlight mode where the screen goes dark,
|
||||
including **None** — the **green LED flashes** for **100 ms every 3 s**, so a dark
|
||||
screen doesn't leave you wondering whether the radio is still on. The flash pauses
|
||||
while the LEDs are needed for something else: while receiving, while transmitting,
|
||||
and while muted (which flashes the red LED instead). It also follows the CPS
|
||||
"disable all LEDs" option.
|
||||
|
||||
---
|
||||
|
||||
## Audio
|
||||
|
|
|
|||
|
|
@ -1541,6 +1541,37 @@ void applicationMainTask(void)
|
|||
}
|
||||
}
|
||||
|
||||
// Power-on indicator: when the display doesn't stay lit, flash the GREEN LED for
|
||||
// 100ms every 3s, so it's still obvious the radio is switched on while the screen
|
||||
// is dark. Only while nothing else owns the LEDs: a LED lit by RX/TX already shows
|
||||
// the radio is alive, and muting flashes the RED one.
|
||||
{
|
||||
static bool heartbeatFlashOn = false;
|
||||
|
||||
bool rxGreen = (slotState == DMR_STATE_RX_1) || (slotState == DMR_STATE_RX_2) ||
|
||||
currentRadioDevice->analogSignalReceived || currentRadioDevice->digitalSignalReceived;
|
||||
bool ledsAreFree = (rxGreen == false) && ((trxTransmissionEnabled || trxIsTransmitting) == false) &&
|
||||
(audioAmpIsMuted() == false) && (lastVolume != -99);
|
||||
|
||||
if ((displayIsBacklightLit() == false) && ledsAreFree)
|
||||
{
|
||||
bool flashOn = ((ticksGetMillis() % 3000) < 100);
|
||||
|
||||
if (flashOn != heartbeatFlashOn)
|
||||
{
|
||||
heartbeatFlashOn = flashOn;
|
||||
LedWrite(LED_GREEN, (flashOn ? 1 : 0));
|
||||
}
|
||||
}
|
||||
else if (heartbeatFlashOn)
|
||||
{
|
||||
// The backlight came on, or RX/TX/mute took the LEDs over: end our flash and
|
||||
// restore the green LED to whatever the current RX state requires.
|
||||
heartbeatFlashOn = false;
|
||||
LedWrite(LED_GREEN, (rxGreen ? 1 : 0));
|
||||
}
|
||||
}
|
||||
|
||||
while(ticksGetMillis() < startTime + 1) // ensure this Task runs at 1ms intervals. Regardless of clock speed.
|
||||
{
|
||||
vTaskDelay(0U);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ FreeTRX keeps OpenGD77's core (DMR/FM, hotspot, CPS compatibility) and adds:
|
|||
- **Battery bars display** — a third battery status option alongside % and
|
||||
voltage: a battery-shaped icon with up to four 25 % segments (Display Options →
|
||||
Battery).
|
||||
- **Power-on indicator** — whenever the backlight is off, the **green LED flashes**
|
||||
for 100 ms every 3 s, so a dark screen never leaves you guessing whether the
|
||||
radio is still on. It pauses while receiving, transmitting or muted.
|
||||
- **DMR reliability fix** — resolves a hard-fault (freeze needing a battery pull)
|
||||
on the DMR path that affected recent self-built OpenGD77 revisions.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue