feat(pm5): hf tune --rgb / lf tune --rgb - antenna RGB as a tuning meter

Adds an opt-in `--rgb` flag to the continuous `hf tune` / `lf tune` commands that
mirrors the antenna tuning level on the PM5 antenna RGB LED: blue = low, green =
mid, red = high, tracking the on-screen bar so you can find coupling (e.g. an
implant) by feel without watching the screen.

The colour is computed client-side from the same per-iteration voltage / running
peak the bar uses (so it matches the bar and auto-scales), and pushed to the
device via a new dumb CMD_PM5_RGB_SET {r,g,b}. That command is handled (#ifdef
PM5) by a dedicated AT32 RGB HAL module, common_arm/rgb/{rgb_apis.h,
rgb_hw_at32.c} (RgbLedSet(), I2C controller @ 0x48), wired into the armsrc
Makefile/CMake as SRC_RGB for PM5 only - so no other platform is affected and no
hardware code lands in shared files.
This commit is contained in:
Nemanja Nedeljkovic authored and Philippe Teuwen committed 2026-08-20 11:55:55 +02:00
1 parent ad4a94b1a5
commit 6507b8f36b
12 files changed
+142 -2

No files matched your search

+3
View File
@@ -45,6 +45,7 @@ ifeq ($(PLATFORM),PM5)
SRC_GPIO = ../common_arm/gpio/gpio_hw_at32.c
SRC_WDT = ../common_arm/wdt/wdt_hw_at32.c
SRC_RSSI = ../common_arm/rssi/rssi_hw_at32.c
SRC_RGB = ../common_arm/rgb/rgb_hw_at32.c
SRC_SYS = ../common_arm/sys/sys_hw_at32.c
SRC_FPGA = ../common_arm/fpga/fpga_hw_at32.c ../common_arm/fpga/fpga_gw_jtag.c
SRC_USB_CDC = ../common_arm/usb/usb_cdc_at32.c
@@ -60,6 +61,7 @@ else
SRC_GPIO = ../common_arm/gpio/gpio_hw_at91.c
SRC_WDT = ../common_arm/wdt/wdt_hw_at91.c
SRC_RSSI = ../common_arm/rssi/rssi_hw_at91.c
SRC_RGB =
SRC_SYS = ../common_arm/sys/sys_hw_at91.c
SRC_FPGA = ../common_arm/fpga/fpga_hw_at91.c
SRC_USB_CDC = ../common_arm/usb/usb_cdc_at91.c
@@ -177,6 +179,7 @@ THUMBSRC = start.c \
$(SRC_STANDALONE) \
$(SRC_ZX) \
$(SRC_RSSI) \
$(SRC_RGB) \
$(SRC_TICKS) \
$(SRC_GPIO) \
$(SRC_WDT) \