Skip to content

feat: transport driver orientation from config.yaml - default 0 rotation. - #355

Open
caveman99 wants to merge 2 commits into
masterfrom
framebuffer-rotate
Open

feat: transport driver orientation from config.yaml - default 0 rotation.#355
caveman99 wants to merge 2 commits into
masterfrom
framebuffer-rotate

Conversation

@caveman99

@caveman99 caveman99 commented Jul 27, 2026

Copy link
Copy Markdown
Member

This is needed for meshtasticd to specify framebuffer orientation from the confg.yaml.

Summary by CodeRabbit

  • New Features
    • Added support for configuring framebuffer display rotation through the MESHTASTIC_FB_ROTATION environment variable.
    • Rotation values are constrained to supported orientations for consistent display behavior.

@caveman99
caveman99 requested a review from mverch67 July 27, 2026 10:02
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Framebuffer initialization now reads MESHTASTIC_FB_ROTATION, parses its integer value, constrains it to LVGL rotation values, and applies the rotation after framebuffer setup.

Changes

Framebuffer rotation

Layer / File(s) Summary
Environment-driven rotation setup
source/graphics/driver/FBDriver.cpp
FBDriver::init reads MESHTASTIC_FB_ROTATION and applies the masked rotation through LVGL when non-zero.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

I’m a rabbit with a spinning screen,
Four neat turns in a framebuffer dream.
An env var hops, the pixels align,
LVGL twirls them right on time.
Squeak—rotation is fine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title captures the main theme of framebuffer orientation and default rotation, which matches the PR's intended change.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@source/graphics/driver/FBDriver.cpp`:
- Around line 39-44: Update the MESHTASTIC_FB_ROTATION parsing in the
framebuffer rotation initialization to accept only values 0 through 3, removing
the rot & 3 masking behavior. Map each valid value explicitly to its
corresponding lv_display_rotation_t constant, while malformed or out-of-range
values fall back to 0° or emit a warning.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6709c46e-417f-43d7-85b9-df760a4afd17

📥 Commits

Reviewing files that changed from the base of the PR and between ef573c3 and 0f23495.

📒 Files selected for processing (1)
  • source/graphics/driver/FBDriver.cpp

Comment thread source/graphics/driver/FBDriver.cpp
@caveman99 caveman99 changed the title Transport driver orientation from config.yaml - default 0 rotation. feat: transport driver orientation from config.yaml - default 0 rotation. Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

An unexpected error occurred while generating fixes: Repository rule violations found

Required status check "Trunk Check Runner" is expected.

caveman99 added a commit to meshtastic/firmware that referenced this pull request Jul 29, 2026
caveman99 added a commit to meshtastic/firmware that referenced this pull request Jul 30, 2026
NomDeTom pushed a commit to brad112358/meshtastic_firmware that referenced this pull request Jul 30, 2026
… screen from config (meshtastic#11252)

* add LR 2021 to portduino, and allow Framebuffer devices to rotate the screen from config. Requires meshtastic/device-ui#355 and supersedes meshtastic#10567 and meshtastic#11138

Many thanks to the original authors https://github.com/a-li3n and https://github.com/jessm33

* Build LR2021Interface.cpp in the wasm env

initLoRa() constructs LR2021Interface for Lora.Module: lr2021, so excluding
the file from the native-wasm source filter left the constructor undefined at
link time. LR20x0Interface.cpp stays excluded; it is template-only and comes in
via the InterfacesTemplates.cpp amalgamation.

Also replace the non-UTF-8 degree signs in the framebuffer rotation comment and
correct the rfswitch alias cleanup comment.

* Trim comments

* Report setenv failure for the framebuffer rotation
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.

3 participants