# Changelog

All notable changes to this fork of the OpenGD77 firmware (MD-UV380 / DM-1701).

This project is still in pre-release iteration, so changes are collected as a
single running list until the first versioned release.

## Unreleased

- **Fix:** green LED **flickering** between the red flashes while muted during a DMR
  QSO. The DMR RX handler re-asserts the green LED as soon as it reads it off, racing
  the main-loop mute clear; the green LED is now **held off at the driver** for the
  whole mute (and released on un-mute), so only the red flash shows.
- **`screenshot.sh`** — a one-command wrapper around the OpenGD77 screen grabber
  that auto-detects the serial port and sets up a self-contained Python venv
  (pyserial + pillow) on first run. Saves to `screenshots/`.

## 0.5.0

- **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,
  mute, dimming, and a button reference.
- **Documentation website** (`website/`) — MkDocs Material config that renders the
  markdown into a static, searchable HTML site (client-side search, dark/light
  theme). Built in Docker via `./website/build-docs.sh`; the public URL is set with
  `SITE_URL=…`. For self-hosting on Forgejo.

## 0.4.0

- **On-radio channel add/delete.** The Channel quick menu (top button) has two new
  entries:
  - **new channel** — creates a blank 145.500 MHz FM channel in the first free
    slot, adds it to the current zone, and opens Channel Details to edit it. The
    zone is reloaded so the channel is immediately navigable.
  - **Delete Channel** — deletes the selected channel after a confirmation, and
    scrubs it out of every zone that referenced it. Refuses to delete the last
    remaining channel, and respects the read-only/APRS channel lock.
  - The new menu strings are **translated** (German, French, Italian, Spanish,
    Portuguese, Dutch, Danish, Swedish, Catalan, Finnish, Czech; English fallback
    for the rest).
- **`flash.sh`** now always rebuilds the language (`.gla`) packs, so edits to the
  language files are picked up instead of a stale pack being re-flashed.
- **Release script** now flags every release before v1.0.0 as a **pre-release**
  (and corrects the flag on re-runs).

## 0.3.0

- **Fix a second voice-prompt crash** on the Screen Dim menu row: the item *label*
  ("Screen Dim") is a raw literal, and the shared menu code voices labels via
  `voicePromptsAppendLanguageString()`, which crashes on any pointer outside the
  language table. That function now ignores non-language pointers, so a stray
  literal is skipped instead of hard-faulting. (The dim value is still announced.)

## 0.2.0

- **Fix crash** opening Display Options with **voice announcements on**: the Screen
  Dim value ("100%"/"50%"/…) is a plain literal, but the shared menu code fed it to
  `voicePromptsAppendLanguageString()`, which derives the prompt index from the
  string's offset within the language table — a foreign pointer produced a garbage
  index and crashed. The value now goes through `voicePromptsAppendString()`. Also
  moved the dim-level high bit off a low legacy option bit (bit 2 → 29) and clamped
  the level so it can never index past the option arrays.
- **7-segment frequency font:** inactive segments are now off (background) instead
  of faintly lit — no dim "ghosting". "MHz" now matches the frequency colour, and
  there's 1px more space between the RX and TX frequency lines.
- **Screen dimming:** added a **15%** idle-dim level (Off / 100 / 50 / 30 / 15).
- **DM-1701 build support** — the Docker build is now parameterized by platform;
  `./build-firmware.sh DM1701` produces `OpenDM1701.bin` (Baofeng DM-1701 /
  Retevis RT-84). Not officially tested yet.
- **Release script** (`scripts/forgejo-release.sh`) now builds and attaches a
  single platform or all of them, and reuses an existing release.
- README: added "What's different from OpenGD77" and a dedicated "Flashing"
  section.

## 0.1.0

First versioned release of FreeTRX (fork of OpenGD77 R20260131).

### Features

- **Screen dimming** — optional idle dimming of the backlight to a fraction of
  the configured brightness (Off / 100% / 50% / 30%), in Auto backlight mode.
  Any activity (keys, rotary, RX, TX) restores full brightness. New setting in
  Display Options.
- **Mute** — one-tap audio mute:
  - **SK2 short-tap** toggles mute on the VFO/Channel screens (except while a DMR
    QSO is on screen, where SK2 keeps its "set TX TG to incoming" function).
  - Turning the **volume knob fully down** is also treated as muted.
  - While muted: a bold **"M"** appears in the status bar (left of the battery)
    and the **red LED flashes** (0.5 s every 2 s).

### Display / UI

- **S-meter** redrawn as discrete blocks — 9 green blocks (S1–S9) plus 6 red
  blocks (S9+10…+60), with gaps and a proportionally-filled leading block, and a
  scale label row beneath (S1 S3 S5 S7 S9 / +20 +40 +60).
- **7-segment "LED" frequency font** for the VFO and SK1-held frequency display,
  with faintly-lit inactive segments; digits are wider than the normal font.
- **Main-menu icons** — a small glyph next to each top-level menu entry.
- Layout spacing adjusted so the contact/TG line, the DMR talkgroup/talker and
  the private-call caller ID clear the new S-meter label row.

### Fixes

- **DMR no longer hard-faults.** The AMBE codec is now called through C function
  pointers instead of the old inline assembler (which modern GCC miscompiled),
  fixing the freeze-on-DMR that required a battery pull.
- Fixed the DMR talkgroup/talker and private-call caller ID overlapping the
  S-meter labels.

### Build / Tooling

- **Dockerized build** using the Arm GNU Toolchain 14 (matching the official
  builds); always a clean build. `./flash.sh` helper for flashing with model,
  language and DMR donor.
- Integrated the OpenGD77 **screen grabber** (`gd-77_screen_grabber.py`) and the
  GD-77 loader into the repo.
- **`TOOLS.md`** documents building, flashing, screenshots and language files.

### Project

- **Renamed the project to FreeTRX** (fork of OpenGD77). New `README.md`
  documenting the fork and its upstream source; original OpenGD77 README kept as
  `README.OpenGD77.md`. Added `LICENSE.md` reproducing the inherited OpenGD77
  license (modified BSD 3-Clause + non-commercial clause; not GPL-compatible).
- On-screen branding renamed to **FreeTRX** (splash screen + Firmware Info name).
- README notes this iteration is developed/tested only on the **TYT MD-UV380 and
  Retevis RT-3S**, with a contact for testing on other supported radios.
- Firmware-info **credits** simplified to "Marcus DK1DA" and a reference to
  "The original OpenGD77 authors".

### Misc

- Added **Marcus DK1DA** to the firmware-info credits ("Modified Fork by").
