Skip to content

Conversation

freasy
Copy link
Member

@freasy freasy commented May 16, 2025

Adds support for the new Airbot Theia OSD chip.

  • Prevents incorrect display of "no OSD chip detected" message when using Theia OSD.
  • Disables features requiring Max7456 font device when using Theia OSD.

Airbot will release a new OSD chip "Theia" - it is a replacement for the MAX IC.

Requires:
#14391

Summary by CodeRabbit

  • New Features

    • OSD now recognizes Airbot Theia OSD devices when the firmware API is v1.47 or newer.
  • Bug Fixes

    • OSD UI visibility and enabled/disabled states refined to account for Airbot Theia presence and API version, improving accuracy of device detection and configuration indicators.

Copy link
Contributor

coderabbitai bot commented May 16, 2025

Walkthrough

A boolean state property haveAirbotTheiaOsdDevice was added to OSD decoding, computed from flags and API version >= 1.47. osd.initialize UI logic was updated to incorporate this property when deciding visibility/disabled state of Max7456-related UI elements.

Changes

Cohort / File(s) Change Summary
OSD tab changes
src/js/tabs/osd.js
Added haveAirbotTheiaOsdDevice to OSD.data.state (computed as bit_check(d.flags, 7) && semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)). Updated updateOsdView logic: .noOsdChipDetect now checks haveAirbotTheiaOsdDevice === false; .requires-max7456-font-device-detected disabled condition updated to `!isMax7456FontDeviceDetected

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant OSD
    participant FC as FlightController

    User->>UI: Open OSD tab
    UI->>OSD: initialize()
    OSD->>FC: request OSD data
    FC-->>OSD: flags + apiVersion
    OSD->>OSD: decode flags/version
    OSD->>OSD: set haveAirbotTheiaOsdDevice (flag7 && api>=1.47)
    OSD->>UI: updateOsdView()
    note right of UI #D3F2E8: UI decisions incorporate haveAirbotTheiaOsdDevice
    UI->>UI: show/hide .noOsdChipDetect
    UI->>UI: enable/disable .requires-max7456-font-device-detected
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

RN: IMPROVEMENT

Suggested reviewers

  • nerdCopter
  • blckmn
  • ledvinap
  • VitroidFPV

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 072ed7c and d902ce3.

📒 Files selected for processing (1)
  • src/js/tabs/osd.js (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/js/tabs/osd.js
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copy link
Member

@VitroidFPV VitroidFPV left a comment

Choose a reason for hiding this comment

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

Lack any hardware to test, but this shouldn't break existing functionality either. Approving to be ready for FW merge

Copy link

Copy link
Contributor

Preview URL: https://d902ce3f.betaflight-configurator.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: App
Development

Successfully merging this pull request may close these issues.

3 participants