Skip to content

Outputs: give the Smart ESC calibration its own box - #2815

Open
MrScothh wants to merge 2 commits into
iNavFlight:maintenance-10.xfrom
MrScothh:feature/srxl2-calibration-box
Open

MrScothh wants to merge 2 commits into
iNavFlight:maintenance-10.xfrom
MrScothh:feature/srxl2-calibration-box

Conversation

@MrScothh

@MrScothh MrScothh commented Sep 30, 2026 •

Copy link
Copy Markdown

The Spektrum Smart ESC's throttle range calibration sat inside the Configuration box of the Outputs tab, under the SRXL2 settings, where it read as one more setting. It is a procedure run once on the bench, with its own warning and buttons, so this gives it a box of its own between Configuration and Motors. It shows with the SRXL2 protocol, as before.

Its two buttons used regular-button, which only the Onboard Logging tab styles, so here "Start calibration" showed as plain text, the same whether it could be pressed or not. They now use default_btn, as the buttons of the other tabs do: grey until the checkbox is ticked, blue after.

The change

  • tabs/outputs.html: the calibration moves out of #srxl2-esc into its own gui_box, #srxl2-calibration, with the same title, warning, checkbox, buttons and status, and the same ids.
  • tabs/outputs.js: srxl2UpdateVisibility() shows and hides it together with #srxl2-esc.
  • src/css/tabs/motors.css: 10px under the button, because the status banner below it clears the floated button and so loses its own top margin.

What the calibration does is unchanged: the ids and the handlers are the same.

Tested

  • SITL with SRXL2: the box between Configuration and Motors, hidden with another protocol, the button disabled and enabled by the checkbox, the status banner under it. I did not run a calibration, since SITL has no battery to detect.
  • npm test: 290 of 291 pass. The one failure, "unused MZTC writes remain unused and conservatively blocked", fails the same way on maintenance-10.x.

calibration box

Related

#2814 (the ESC connector option) changes the same two files. They merge without conflicts. I took the screenshot with the two together; nothing of #2814 is in view.

#2828 (a protocol change calls off the calibration) also changes srxl2UpdateVisibility(). The two merge cleanly in either order; I'll run them together on a board before either is merged.

The throttle range calibration sat inside the Configuration box, below the
SRXL2 settings, where it read as one more setting. It is a procedure run
once on the bench, so it gets its own box between Configuration and Motors,
shown with the SRXL2 protocol as before.

Its buttons used regular-button, which only the Onboard Logging tab styles,
so on this tab Start calibration showed as plain text. They use default_btn
now, as the buttons of the other tabs do.
@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

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

Copy link
Copy Markdown

PR Summary by Qodo

Give Smart ESC calibration its own Outputs box

✨ Enhancement 🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Move Smart ESC calibration into a dedicated box between Configuration and Motors.
• Show the box only for SRXL2, preserving the existing calibration behavior.
• Restore visible disabled and enabled button styles and space the status banner below them.
Diagram

graph TD
    P["ESC protocol"] --> V["Visibility handler"] --> B["Calibration box"] --> C["Calibration controls"] --> H["Existing handlers"]
    V --> S["SRXL2 settings"]
Loading
High-Level Assessment

A separate box with the existing element IDs is the simplest fit: it distinguishes a bench procedure from configuration without changing calibration behavior. Reworking the calibration workflow would add risk without addressing this UI issue.

Files changed (3) +28 / -20

Enhancement (3) +28 / -20
motors.cssSpace the calibration status below its buttons +5/-0

Space the calibration status below its buttons

• Adds a scoped bottom margin to the floated calibration button wrapper so the status banner has visible separation.

src/css/tabs/motors.css

outputs.htmlMove calibration into a standalone Outputs box +22/-19

Move calibration into a standalone Outputs box

• Moves the warning, acknowledgement, controls, and status between Configuration and Motors while retaining their IDs. Uses the tab's styled default buttons in place of unstyled regular buttons.

tabs/outputs.html

outputs.jsGate the new box on the SRXL2 protocol +1/-1

Gate the new box on the SRXL2 protocol

• Extends the existing protocol visibility toggle to include the calibration box. Calibration event handlers remain unchanged.

tabs/outputs.js

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can route each severity your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Configurator test build ready — commit 187bf51

Download build artifacts for PR #2815

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.

@sensei-hacker sensei-hacker added the New Feature Entirely new feature or major feature change label Oct 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

@MrScothh

MrScothh commented Oct 7, 2026

Copy link
Copy Markdown
Author

Ran the calibration from this box against a real Avian, on an E-flite T-28 with a TBS Lucid H7 Wing (firmware from today's maintenance-10.x), propeller off: the box sits under Configuration, the checkbox enables Start, the banner says "Connect the battery now" while it waits, and "Finished" once the battery went in and the sequence ended; the checkbox is cleared and Start disabled again afterwards.

Throttle range calibration, finished

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

New Feature Entirely new feature or major feature change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants