add LR 2021 to portduino, and allow Framebuffer devices to rotate the screen from config - #11252
add LR 2021 to portduino, and allow Framebuffer devices to rotate the screen from config#11252caveman99 wants to merge 1 commit into
Conversation
… screen from config. Requires meshtastic/device-ui#355 and supersedes #10567 and #11138 Many thanks to the original authors https://github.com/a-li3n and https://github.com/jessm33
⚡ Try this PR in the Web FlasherWarning This is an automated, unreviewed CI test build. Back up your device configuration Supported boards built by this PR (31)
Build artifacts expire on 2026-08-26. Updated for |
📝 WalkthroughWalkthroughPortduino now supports LR2021 module selection, configuration, power limits, and compilation. The framebuffer display path also exports configured rotation through ChangesPortduino LR2021 enablement
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant PortduinoConfig
participant RadioInterface
participant LR2021Interface
PortduinoConfig->>RadioInterface: select use_lr2021
RadioInterface->>LR2021Interface: construct LR2021Interface
LR2021Interface-->>RadioInterface: provide radio interface
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/platform/portduino/PortduinoGlue.h (1)
105-106: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse camelCase for the new member variables.
Rename
lr2021_max_powerandlr2021_max_power_hftolr2021MaxPowerandlr2021MaxPowerHf, updating their parser, emitter, and macro references accordingly.As per coding guidelines, use PascalCase for classes, camelCase for functions and member variables, and UPPER_SNAKE_CASE for constants and defines.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/platform/portduino/PortduinoGlue.h` around lines 105 - 106, Rename the member variables lr2021_max_power and lr2021_max_power_hf to lr2021MaxPower and lr2021MaxPowerHf, and update every parser, emitter, and macro reference to use the new names consistently.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/mesh/LR11x0Interface.cpp`:
- Around line 381-385: Correct the cleanup comment above the `#undef` directives
to reference the actual member path portduino_config.rfswitch_dio_pins, removing
the duplicated portduino_config qualifier while leaving the macro cleanup
unchanged.
---
Nitpick comments:
In `@src/platform/portduino/PortduinoGlue.h`:
- Around line 105-106: Rename the member variables lr2021_max_power and
lr2021_max_power_hf to lr2021MaxPower and lr2021MaxPowerHf, and update every
parser, emitter, and macro reference to use the new names consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d6c95ece-98fc-4919-b359-b4c0208ab207
📒 Files selected for processing (8)
src/graphics/tftSetup.cppsrc/mesh/InterfacesTemplates.cppsrc/mesh/LR11x0Interface.cppsrc/mesh/LR2021Interface.cppsrc/mesh/LR20x0Interface.cppsrc/mesh/RadioInterface.cppsrc/platform/portduino/PortduinoGlue.cppsrc/platform/portduino/PortduinoGlue.h
|
|
||
| // Undo the ARCH_PORTDUINO macro aliases. This would pollute | ||
| // `portduino_config.portduino_config.rfswitch_dio_pins`. | ||
| #undef rfswitch_dio_pins | ||
| #undef rfswitch_table |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the duplicated member qualifier in the cleanup comment.
The comment refers to portduino_config.portduino_config.rfswitch_dio_pins; the actual path is portduino_config.rfswitch_dio_pins.
Proposed fix
-// `portduino_config.portduino_config.rfswitch_dio_pins`.
+// `portduino_config.rfswitch_dio_pins`.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Undo the ARCH_PORTDUINO macro aliases. This would pollute | |
| // `portduino_config.portduino_config.rfswitch_dio_pins`. | |
| #undef rfswitch_dio_pins | |
| #undef rfswitch_table | |
| // Undo the ARCH_PORTDUINO macro aliases. This would pollute | |
| // `portduino_config.rfswitch_dio_pins`. | |
| `#undef` rfswitch_dio_pins | |
| `#undef` rfswitch_table |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/mesh/LR11x0Interface.cpp` around lines 381 - 385, Correct the cleanup
comment above the `#undef` directives to reference the actual member path
portduino_config.rfswitch_dio_pins, removing the duplicated portduino_config
qualifier while leaving the macro cleanup unchanged.
vidplace7
left a comment
There was a problem hiding this comment.
Currently breaks the native-wasm target at link-time.
Linking .pio/build/native-wasm/meshnode.mjs
wasm-ld: error: .pio/build/native-wasm/src/mesh/RadioInterface.cpp.o: undefined symbol: LR2021Interface::LR2021Interface(LockingArduinoHal*, unsigned int, unsigned int, unsigned int, unsigned int)
em++: error: '/home/runner/work/firmware/firmware/emsdk-cache/emsdk-main/upstream/bin/wasm-ld @/tmp/emscripten_w_bs6_zi.rsp.utf-8' failed (returned 1)
Requires meshtastic/device-ui#355 and supersedes #10567 and #11138
Many thanks to the original authors https://github.com/a-li3n and https://github.com/jessm33
N.B. This PR enables meshtasticd with framebuffer MUI on Lilygo T-Display K230
Summary by CodeRabbit
New Features
Bug Fixes