Skip to content

Conversation

demvlad
Copy link
Contributor

@demvlad demvlad commented Oct 3, 2025

Added TELEMETRY_MAVLINK debug fields settings for "Added flow control for MAVLink telemetry" PR

Summary by CodeRabbit

  • New Features
    • Added MAVLink Telemetry debug mode with user-friendly labels for debug[all] and debug[0–3], so telemetry-related values display clearly.
    • Expanded debug mode options (including CHIRP and FLASH_TEST_PRBS) for firmware 2025.12.0+, and added sensible default graph ranges for MAVLink telemetry fields.

Copy link

coderabbitai bot commented Oct 3, 2025

Walkthrough

Adds MAVLINK_TELEMETRY as a debug mode (gated at firmwareVersion >= 2025.12.0), adds friendly field-name mappings for MAVLink telemetry, and provides default graph ranges for its debug indices. No exported signatures changed.

Changes

Cohort / File(s) Summary
Debug modes
src/flightlog_fielddefs.js
Consolidates firmwareVersion >= 2025.12.0 debug-mode additions into a single DEBUG_MODE.push call, adding MAVLINK_TELEMETRY among other entries; control flow and signatures unchanged.
Friendly names
src/flightlog_fields_presenter.js
Extends DEBUG_FRIENDLY_FIELD_NAMES_INITIAL with MAVLINK_TELEMETRY mappings for debug[all] and debug[0..3].
Graph config
src/graph_config.js
Adds MAVLINK_TELEMETRY case in GraphConfig.getDefaultCurveForField with index-specific MinMax ranges (debug[0] {0..1}, debug[1..2] {0..100}, debug[3] {0..50}); other logic unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant UI as UI
  participant Presenter as FlightLogFieldsPresenter
  participant GC as GraphConfig
  participant Renderer as Graph Renderer

  UI->>Presenter: Select debug mode = MAVLINK_TELEMETRY
  Presenter-->>UI: Friendly names (debug[all], debug[0..3])

  loop For each selected field debug[i]
    UI->>GC: getDefaultCurveForField("debug[i]", MAVLINK_TELEMETRY)
    alt i == 0
      GC-->>UI: MinMax {min:0, max:1}
    else i == 1 or i == 2
      GC-->>UI: MinMax {min:0, max:100}
    else i == 3
      GC-->>UI: MinMax {min:0, max:50}
    else other
      GC-->>UI: getCurveForMinMaxFields(...)
    end
  end

  UI->>Renderer: Render curves with ranges
  Renderer-->>UI: Display telemetry debug graphs
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Fix semver #858: Touches src/flightlog_fielddefs.js and adjusts DEBUG_MODE entries and the 2025.12.0 firmware boundary.

Suggested labels

Work in progress

Suggested reviewers

  • haslinghuis
  • nerdCopter
  • ctzsnooze

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The provided description is a single line that does not follow the repository’s required template, omitting context such as branch usage, related issue references, testing instructions, CI status, and it fails to remove the instructional template text. Please revise the description to adhere to the template by removing the guideline text, adding a detailed summary of changes, branch information, links to related issues or PRs, testing steps, and confirmation of CI build status.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and succinctly describes the main change—adding debug field settings for MAVLink telemetry—without extraneous details or ambiguity.
✨ 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e44426 and 14e8ef0.

📒 Files selected for processing (1)
  • src/flightlog_fielddefs.js (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/flightlog_fielddefs.js

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.

@demvlad
Copy link
Contributor Author

demvlad commented Oct 3, 2025

The code checking before commits is the nice feature!

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 3, 2025
@demvlad demvlad marked this pull request as draft October 3, 2025 14:35
@demvlad demvlad marked this pull request as ready for review October 3, 2025 14:42
coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 3, 2025
@demvlad
Copy link
Contributor Author

demvlad commented Oct 3, 2025

Perhaps the sonarqubecloud have learned the new code rules! :)

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 3, 2025
haslinghuis
haslinghuis previously approved these changes Oct 3, 2025
Copy link
Member

@haslinghuis haslinghuis left a comment

Choose a reason for hiding this comment

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

Wow 10 debug modes added in one release

@demvlad demvlad dismissed stale reviews from haslinghuis and coderabbitai[bot] via 14e8ef0 October 3, 2025 15:10
@demvlad demvlad marked this pull request as ready for review October 3, 2025 15:10
Copy link

sonarqubecloud bot commented Oct 3, 2025

Copy link

github-actions bot commented Oct 3, 2025

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

Copy link
Member

@haslinghuis haslinghuis left a comment

Choose a reason for hiding this comment

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

Thanks for fixing indentation

👾

@haslinghuis haslinghuis merged commit 16dd2bc into betaflight:master Oct 3, 2025
5 checks passed
@demvlad demvlad deleted the mavlink_debug branch October 3, 2025 15:15
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.

2 participants