Skip to content

feat(radio): add configurable power LED color overrides for H7 Remote#7454

Open
qkdxorjs1002 wants to merge 1 commit into
EdgeTX:mainfrom
qkdxorjs1002:main
Open

feat(radio): add configurable power LED color overrides for H7 Remote#7454
qkdxorjs1002 wants to merge 1 commit into
EdgeTX:mainfrom
qkdxorjs1002:main

Conversation

@qkdxorjs1002

@qkdxorjs1002 qkdxorjs1002 commented Jun 13, 2026

Copy link
Copy Markdown

Summary of changes:

Support additional POWER_LED_* build options and validate that only one color override is enabled at a time. Extend the generic STM32 LED driver to handle RGB combinations for yellow, magenta, and cyan. (except red)

IMG_5513

Summary by CodeRabbit

  • New Features
    • Expanded power LED color configuration options during build setup. Users can now select from Green, Cyan, Yellow, Magenta, or White in addition to the existing Blue option.
    • Build system enforces that only one power LED color is active per configuration.
    • Added LED color function support across hardware platforms to enable the new color selections.

Support additional POWER_LED_* build options and validate that only one
color override is enabled at a time. Extend the generic STM32 LED driver
to handle RGB combinations for yellow, magenta, and cyan.
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f77c57b-e671-411c-92fe-d3340cf1fd2a

📥 Commits

Reviewing files that changed from the base of the PR and between 15921e1 and ddb9804.

📒 Files selected for processing (8)
  • radio/src/CMakeLists.txt
  • radio/src/boards/generic_stm32/led_driver.cpp
  • radio/src/boards/jumper-h750/board.cpp
  • radio/src/boards/jumper-h750/board.h
  • radio/src/boards/rm-h750/board.cpp
  • radio/src/boards/rm-h750/board.h
  • radio/src/edgetx.h
  • radio/src/options.h

📝 Walkthrough

Walkthrough

The PR extends the power LED color selection from a hardcoded blue option to six compile-time selectable colors. CMake validation ensures only one color is active, the LED driver is refactored into an RGB helper with new color functions, boards initialize the selected color at startup, and LED macros tie the selection to status indicators.

Changes

Power LED Color Selection Extension

Layer / File(s) Summary
Build configuration for power LED colors
radio/src/CMakeLists.txt
Five new POWER_LED_* options (GREEN, CYAN, YELLOW, MAGENTA, WHITE) are added with a configuration check that fails if more than one is enabled. Compile definitions are emitted via loop over enabled colors instead of single POWER_LED_BLUE conditional.
LED driver RGB implementation and color functions
radio/src/boards/generic_stm32/led_driver.cpp
New static ledRgb(red, green, blue) helper centralizes RGB control. Existing ledRed, ledGreen, ledBlue refactored to call ledRgb. Four new weak functions (ledYellow, ledMagenta, ledCyan, ledWhite) added with appropriate RGB GPIO mappings.
Board-level LED declarations and initialization
radio/src/boards/jumper-h750/board.h, radio/src/boards/jumper-h750/board.cpp, radio/src/boards/rm-h750/board.h, radio/src/boards/rm-h750/board.cpp
Both boards add header function declarations for new colors. boardInit() in each updated to conditionally call the selected color function based on POWER_LED_* macros, with blue as fallback.
LED macro definitions and option array fixes
radio/src/edgetx.h, radio/src/options.h
STATUS_LEDS macros in edgetx.h expanded to map LED_ERROR_END() to board-specific POWER_LED_* colors. options.h corrects missing #endif blocks for POWER_LED_* entries to properly close preprocessor conditionals.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding configurable power LED color overrides for H7 Remote hardware.
Description check ✅ Passed The description provides a clear summary of changes aligned with the template, though it lacks a 'Fixes' reference which is optional per the template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant