Skip to content

Conversation

nerdCopter
Copy link
Member

@nerdCopter nerdCopter commented Jul 12, 2025

AI generated to support #14533 with backward compatibility.

  • tested only briefly.

Summary of Changes Committed:
Added version-gated DUAL_GYRO to MULTI_GYRO renaming for firmware 4.6.0+ in flightlog_fielddefs.js
Added MULTI_GYRO debug field display names in flightlog_fields_presenter.js supporting up to 4 gyros
Added MULTI_GYRO debug mode aliases in flightlog_parser.js for backward compatibility
Updated case statements to handle the new MULTI_GYRO debug modes

Summary by CodeRabbit

  • New Features

    • Added support for multi-gyro debug modes, including new field names and friendly display for multi-gyro data.
    • Enhanced value conversion and display for multi-gyro debug fields, showing data in degrees per second.
  • Bug Fixes

    • Improved compatibility by mapping new multi-gyro debug field names to legacy dual-gyro equivalents for seamless parsing and display.

Copy link

coderabbitai bot commented Jul 12, 2025

Walkthrough

The changes introduce support for new "multi-gyro" debug modes, replacing and aliasing previous "dual-gyro" modes in various parts of the codebase. This includes conditional renaming of debug mode entries, friendly name mappings, value conversion logic, and parser translation aliases, all targeting compatibility with firmware versions 4.6.0 and above.

Changes

File(s) Change Summary
src/flightlog_fielddefs.js Added conditional logic to rename "DUAL_GYRO_" debug modes to "MULTI_GYRO_" for firmware ≥ 4.6.0.
src/flightlog_fields_presenter.js Added friendly names and conversion logic for "MULTI_GYRO_*" debug modes in presenter functions.
src/flightlog_parser.js Added aliases to translate "multi_gyro" debug field names to legacy "dual_gyro" equivalents.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FlightLogFieldDefs
    participant FlightLogFieldPresenter
    participant FlightLogParser

    User->>FlightLogFieldDefs: Request field definitions (fw >= 4.6.0)
    FlightLogFieldDefs->>FlightLogFieldDefs: Rename DUAL_GYRO_* to MULTI_GYRO_*

    User->>FlightLogFieldPresenter: Request friendly name or value conversion for MULTI_GYRO_* debug field
    FlightLogFieldPresenter->>FlightLogFieldPresenter: Map to friendly name and convert value (deg/s)

    User->>FlightLogParser: Parse log with MULTI_GYRO_* fields
    FlightLogParser->>FlightLogParser: Translate MULTI_GYRO_* to DUAL_GYRO_* aliases
Loading

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9b40aef and c24cdce.

📒 Files selected for processing (3)
  • src/flightlog_fielddefs.js (1 hunks)
  • src/flightlog_fields_presenter.js (3 hunks)
  • src/flightlog_parser.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/flightlog_fielddefs.js
  • src/flightlog_parser.js
  • src/flightlog_fields_presenter.js
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

Documentation and Community

  • 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.

@nerdCopter nerdCopter marked this pull request as ready for review July 12, 2025 18:08
coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 12, 2025
@haslinghuis
Copy link
Member

Instead of adding - we should rename it for firmware 4.6

@nerdCopter
Copy link
Member Author

Instead of adding - we should rename it for firmware 4.6

i'll investigate, i do want backward compat.

@nerdCopter nerdCopter marked this pull request as draft July 12, 2025 20:08
@nerdCopter

This comment was marked as outdated.

@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member

@nerdCopter
Copy link
Member Author

Please take a look at #846 (files)

what do you see that i do not see? i did not want to force-push, so it's a commit over 9b40

@nerdCopter nerdCopter changed the title feat: add MULTI_GYRO debug mode support rename DUAL_GYRO to MULTI_GYRO (debug mode) Jul 14, 2025
@haslinghuis
Copy link
Member

haslinghuis commented Jul 15, 2025

Please move all changes here: https://github.com/betaflight/blackbox-log-viewer/pull/846/files#diff-1c35af2d073b48014296ed8da03ed89c112f28d05456355d2bf04f3fb3e92ce4R535-R552

Perhaps take the configurator PR as reference.

Add version-gated DUAL_GYRO to MULTI_GYRO debug mode renaming with display names
supporting up to 4 gyros. Debug modes show proper axis labels like 'Gyro 1 Diff [roll]'
and maintain backward compatibility with existing DUAL_GYRO modes.
@nerdCopter nerdCopter force-pushed the 20250712_multi_gyro_diff branch from f98c2ee to c24cdce Compare July 15, 2025 19:23
Copy link

Copy link

Preview URL: https://c24cdce1.betaflight-blackbox.pages.dev

@nerdCopter
Copy link
Member Author

i force pushed as single commit. please verify expectation.
image

@nerdCopter nerdCopter marked this pull request as ready for review July 15, 2025 19:27
@nerdCopter
Copy link
Member Author

@blckmn , please set to 2 approvals required so that coderabbitAI is not the only approval

@haslinghuis haslinghuis self-requested a review July 15, 2025 20:08
@haslinghuis haslinghuis merged commit c56fc8e into betaflight:master Jul 15, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Sep 23, 2025
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.

2 participants