Skip to content

Bidir dshot - show RPM in motor tab - #2851

Open
error414 wants to merge 6 commits into
iNavFlight:maintenance-10.xfrom
error414:error414/feature/bidir-dshot
Open

error414 wants to merge 6 commits into
iNavFlight:maintenance-10.xfrom
error414:error414/feature/bidir-dshot

Conversation

@error414

@error414 error414 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

This PR is for iNavFlight/inav#12214

image

@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change because it should never be included in any release, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@error414
error414 changed the base branch from master to maintenance-10.x November 8, 2026 20:10
@error414 error414 mentioned this pull request Nov 8, 2026
10 tasks done
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Show bidirectional DSHOT RPM and telemetry in Outputs

✨ Enhancement 🕐 20-40 Minutes

Grey Divider

AI Description

• Add bidirectional DSHOT and extended telemetry controls for supported DSHOT protocols.
• Show per-motor RPM and telemetry success when the RPM filter is enabled.
• Distinguish unavailable telemetry from failed frames and highlight low success rates.
Diagram

graph TD
  UI["Outputs tab"] --> Filter{"RPM filter on?"} -->|yes| Poll["MSP RPM request"] --> Firmware["Flight controller"] --> Decode["ESC RPM decoder"] --> Cache["FC ESC_RPM"] --> Bars["Motor bars"]
  Filter -->|no| Bars
  UI -->|DSHOT settings| Firmware
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Poll based on telemetry capability
  • ➕ Could show available ESC RPM even when the RPM filter is disabled.
  • ➖ Requires capability detection or additional unsupported-command probes and may increase polling traffic.

Recommendation: Keep the PR’s RPM-filter-gated polling to limit requests and preserve its stated display behavior. Consider capability-driven polling separately if showing RPM without the filter becomes a requirement.

Files changed (7) +211 / -2

Enhancement (6) +184 / -2
fc.jsInitialize per-motor ESC telemetry storage +6/-0

Initialize per-motor ESC telemetry storage

• Adds an empty ESC_RPM collection for decoded RPM and frame statistics. An empty collection lets tabs omit readouts when telemetry is unavailable.

js/fc.js

MSPCodes.jsRegister the ESC RPM MSP command +5/-1

Register the ESC RPM MSP command

• Defines MSP2_INAV_ESC_RPM for the per-motor RPM and telemetry response.

js/msp/MSPCodes.js

MSPHelper.jsDecode per-motor RPM and frame statistics +26/-0

Decode per-motor RPM and frame statistics

• Parses seven-byte motor records into FC.ESC_RPM and treats windows with no expected frames as unknown. Clears the collection when the command is unsupported.

js/msp/MSPHelper.js

motors.cssStyle RPM and telemetry motor-bar overlays +38/-0

Style RPM and telemetry motor-bar overlays

• Positions RPM and telemetry readouts on motor bars and highlights success rates below 98 percent in red.

src/css/tabs/motors.css

outputs.htmlAdd bidirectional DSHOT and EDT controls +19/-0

Add bidirectional DSHOT and EDT controls

• Adds settings-bound checkboxes, contextual help, and a safety warning to the Outputs tab. The controls start hidden until protocol and settings visibility is resolved.

tabs/outputs.html

outputs.jsPoll and display ESC telemetry in Outputs +90/-1

Poll and display ESC telemetry in Outputs

• Shows DSHOT controls according to the selected protocol and loaded settings. When the RPM filter is enabled, adds an ESC RPM request to periodic polling and displays per-motor RPM, success rate, and unknown or error states.

tabs/outputs.js

Documentation (1) +27 / -0
messages.jsonExplain DSHOT controls and motor telemetry +27/-0

Explain DSHOT controls and motor telemetry

• Adds labels, help text, and a firmware safety warning for bidirectional DSHOT and EDT. Adds RPM, success-rate, and unknown-telemetry display strings.

locale/en/messages.json

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Motor RPM vanishes when the filter is off 🐞 Bug ≡ Correctness
Description
getPeriodicMotorOutput() requests ESC RPM only when self.rpmFilterEnabled is true, and the
readout helpers also suppress telemetry when it is false. The gyro RPM filter is a separate setting
from ESC telemetry, so pilots with telemetry available but the filter disabled see neither RPM nor
frame-success information in the motor tab.
Code

tabs/outputs.js[980]

+            MSP.send_message(MSPCodes.MSP_MOTOR, false, false, self.rpmFilterEnabled ? getPeriodicEscRpm : getPeriodicServoOutput);
Evidence
The PID tab exposes rpm_gyro_filter_enabled as its own filter setting, while the new motor-tab
path uses it both to skip the ESC RPM request and to return blank readouts. The ESC RPM parser
accepts supported responses without checking that filter setting.

tabs/pid_tuning.html[763-772]
tabs/outputs.js[977-987]
tabs/outputs.js[996-1033]
js/msp/MSPHelper.js[1956-1979]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The motor tab gates ESC RPM polling and display on the gyro RPM filter, hiding available telemetry when that filter is disabled.
## Fix Focus Areas
- tabs/outputs.js[977-987]
- tabs/outputs.js[996-1033]
## Recommended Fix
Request ESC RPM independently of `rpm_gyro_filter_enabled` and render returned entries whenever available. Keep the existing empty-array behavior for unsupported firmware.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can import rules and skills only from the repositories your team follows

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Configurator test build ready — commit 3445f38

Download build artifacts for PR #2851

Available platforms (scroll to the Artifacts section at the bottom of the run page):

  • Windows x64 (ZIP, MSI) and x32 (ZIP, MSI)
  • macOS arm64 (ZIP, DMG) and x64 (ZIP, DMG)
  • Linux x64 (DEB, RPM, ZIP) and aarch64 (DEB, RPM, ZIP)

A GitHub login is required to download artifacts. Build is for testing only.

@sonarqubecloud

Copy link
Copy Markdown

@sensei-hacker sensei-hacker added this to the 10.1 milestone Nov 22, 2026

This branch has not been deployed

No deployments
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