Skip to content

Conversation

@a664571463
Copy link
Contributor

@a664571463 a664571463 commented Dec 7, 2025

to support the FlySky PA01.
new file: src/SCRIPTS/BF/TEMPLATES/320x240.lua
modified: src/SCRIPTS/BF/radios.lua

Summary by CodeRabbit

  • New Features
    • Added support for 320x240 screen resolution.
    • Provides an optimized UI layout with tuned spacing and layout parameters for improved display on that resolution.

✏️ Tip: You can customize this high-level summary in your review settings.

to support the FlySky PA01.
	new file:   src/SCRIPTS/BF/TEMPLATES/320x240.lua
	modified:   src/SCRIPTS/BF/radios.lua
@coderabbitai
Copy link

coderabbitai bot commented Dec 7, 2025

Walkthrough

Adds a new 320x240 UI resolution by introducing a template configuration module and registering a corresponding "320x240" entry in the radios configuration.

Changes

Cohort / File(s) Summary
New UI Template Configuration
src/SCRIPTS/BF/TEMPLATES/320x240.lua
Adds a Lua module that returns a layout table: margin = 5, indent = 15, lineSpacing = 20, listSpacing = { line = 20, field = 170 }, tableSpacing = { row = 25, col = 60, header = 20 }.
Radio Resolution Support
src/SCRIPTS/BF/radios.lua
Adds a 320x240 entry to supportedRadios with an MSP config pointing to the new template (TEMPLATES/320x240.lua) and resolution-specific UI flags and bounds; CMS remains nil.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Check that spacing and bounds are appropriate for 320x240 and consistent with 320x320 / 320x480 patterns
  • Verify the template path and name match the radios entry and build/runtime resource lookup
  • Confirm no typos or syntax issues in the new Lua file

Poem

🐰 Tiny screen, a cozy view,
Margins ordered, spacing true,
A new template hops on cue,
320x240 — hello, woohoo! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and lacks expected context such as issue references, motivation details, and proper formatting per the template guidelines. Add issue reference (Fixes #532), explain the purpose more thoroughly, and follow the repository's pull request description template structure.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a new 320x240 resolution configuration file to support the FlySky PA01.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c08581 and 94c100d.

📒 Files selected for processing (1)
  • src/SCRIPTS/BF/radios.lua (1 hunks)
🔇 Additional comments (1)
src/SCRIPTS/BF/radios.lua (1)

154-180: Verify template file existence and configuration validity.

The layout calculations for MenuBox (x=80, w=160) and SaveBox (x=80, w=144) are mathematically sound within a 320-pixel width. The cms = nil decision aligns with the stated lack of testing hardware. However, confirm that the referenced template file src/SCRIPTS/BF/TEMPLATES/320x240.lua exists and that the configuration structure conforms to the codebase patterns.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ccf92d0 and 6c08581.

📒 Files selected for processing (2)
  • src/SCRIPTS/BF/TEMPLATES/320x240.lua (1 hunks)
  • src/SCRIPTS/BF/radios.lua (1 hunks)
🔇 Additional comments (2)
src/SCRIPTS/BF/radios.lua (1)

154-178: LGTM! MSP configuration dimensions are appropriate.

The MSP configuration values are well-suited for the 320x240 resolution:

  • MenuBox and SaveBox dimensions fit within screen bounds
  • NoTelem position (x=128) is appropriately centered
  • Y-axis limits (30-200) provide good usable vertical space
src/SCRIPTS/BF/TEMPLATES/320x240.lua (1)

1-7: Verify listSpacing.field value by comparing with other resolution templates.

The field = 170 in listSpacing represents 53% of the 320-pixel screen width. To determine if this causes layout issues, compare this value proportionally against other resolution templates (e.g., 480x272, 800x480) to establish if there's a consistent pattern or if this deviates significantly.

@a664571463
Copy link
Contributor Author

It should resolve issue #532 — it's running successfully on my PA01.

@haslinghuis
Copy link
Member

@a664571463 can you check / try coderabbitai suggestions ?

@a664571463
Copy link
Contributor Author

@haslinghuis Sorry, I don't have a TBS Crossfire/Tracer on hand to perform testing. For the sake of rigor, I've set cms = nil. We can revise it later when someone with the actual hardware encounters an issue.

perform testing. For the sake of rigor, I've set
cms = nil. We can revise it later when someone
with the actual hardware encounters an issue.

modified:   src/SCRIPTS/BF/radios.lua
@pfeerick
Copy link

pfeerick commented Dec 7, 2025

@a664571463 Thanks for this, one thing less on my todo list for this weeks as I was going to fix #532 :)

Works for me on PA01.

@a664571463
Copy link
Contributor Author

@pfeerick Thank you for your feedback — this script has made it incredibly convenient to adjust my FPV parameters outdoors and has become an indispensable tool.

@haslinghuis
Copy link
Member

@anti-vaxxer Please elaborate.

@haslinghuis haslinghuis linked an issue Dec 8, 2025 that may be closed by this pull request
@anti-vaxxer
Copy link

@anti-vaxxer Please elaborate.

AI message

@haslinghuis haslinghuis merged commit 6484170 into betaflight:master Dec 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don‘t work on flysky PA01

4 participants