Skip to content

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Sep 24, 2025

Summary by CodeRabbit

  • New Features
    • Improved, human-friendly labels and expanded field set for GPS Rescue throttle PID debug metrics on newer firmwares (≈4.5.0+). Added readable names for Throttle P/I/D, Altitude, Target altitude, Tilt adjustment, pre-smoothing Throttle D, and Throttle adjustment. Logs and charts now recognize and convert the additional fields for consistent display and unit handling. No user action required; changes apply automatically.

@haslinghuis haslinghuis added this to the 4.0.0 milestone Sep 24, 2025
@haslinghuis haslinghuis self-assigned this Sep 24, 2025
Copy link

coderabbitai bot commented Sep 24, 2025

Walkthrough

Updates GPS_RESCUE_THROTTLE_PID debug-field labels and conversion/decoding handling in src/flightlog_fields_presenter.js to expose all eight signals (debug[0..7]) across firmware version branches (notably >=4.5.0).

Changes

Cohort / File(s) Summary
GPS Rescue debug field mappings
src/flightlog_fields_presenter.js
Replaces previous smaller GPS_RESCUE_THROTTLE_PID block with an expanded mapping for debug[all] and debug[0..7] (Throttle P, Throttle D, Altitude, Target altitude, Throttle I, Tilt adjustment, Throttle D before lp smoothing, Throttle adjustment). Adds decodeDebugFieldToFriendly cases for debug[4] and debug[6] (uS formatting/altitude behavior) and ConvertDebugFieldValue conversions for debug[4] and debug[6]. Applies within firmware version conditionals (including >=4.5.0).

Sequence Diagram(s)

sequenceDiagram
  participant Parser as Blackbox Parser
  participant Presenter as FlightLogFieldPresenter
  participant Decoder as decodeDebugFieldToFriendly / ConvertDebugFieldValue
  participant UI as Signal Name Renderer

  Parser->>Presenter: provide debug group id + firmware version
  Presenter->>Decoder: lookup DEBUG_FRIENDLY_FIELD_NAMES for GPS_RESCUE_THROTTLE_PID
  Decoder-->>Presenter: return per-index label & unit conversions (now supports debug[0..7])
  Presenter->>UI: supply friendly labels & converted values for plotting/rendering
  Note right of UI: All 8 signals labeled and converted
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • nerdCopter
  • ctzsnooze

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description only contains a single line referencing the issue number and lacks the required template sections such as a clear summary of changes, motivation, and testing instructions, so it does not meet the repository’s pull request description guidelines. Please expand the description to include a concise summary of what was changed and why, detail any impact or testing steps, and ensure any boilerplate instructions are removed or replaced with relevant context.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues Check ✅ Passed This pull request implements the missing labels for all eight GPS_RESCUE_THROTTLE_PID debug signals and updates the decoding and conversion logic exactly as specified in issue #680, fully addressing the reported missing signal names.
Out of Scope Changes Check ✅ Passed All code changes are focused on extending the GPS_RESCUE_THROTTLE_PID mapping and its related decode/convert logic, with no unrelated modifications detected outside the scope of the linked issue’s objectives.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title clearly summarizes the primary change of adding the previously missing GPS Rescue Throttle PID debug fields, matching the changeset’s focus on expanding and labeling those fields.
✨ 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

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9e1863 and 1092c04.

📒 Files selected for processing (1)
  • src/flightlog_fields_presenter.js (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ctzsnooze
PR: betaflight/blackbox-log-viewer#851
File: src/flightlog_fields_presenter.js:0-0
Timestamp: 2025-08-14T02:50:17.745Z
Learning: In the Betaflight blackbox log viewer, PT1K debug fields should use 0.xxx format with /1000 scaling for proper chart display, as confirmed by ctzsnooze for the FEEDFORWARD and FEEDFORWARD_LIMIT debug modes.

coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 24, 2025
Copy link

Copy link

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

@haslinghuis haslinghuis changed the title Add GPS Rescue debug fields Add missing GPS Rescue Throttle PID debug fields Sep 24, 2025
@haslinghuis haslinghuis merged commit 07fc1d1 into betaflight:master Sep 25, 2025
5 checks passed
@haslinghuis haslinghuis deleted the fix-gps-rescue branch September 25, 2025 19:27
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.

4.5 RC1: Blackbox - GPS_RESCUE_THROTTLE_PID - Missing signal names

2 participants