Skip to content

fix(app): leave the passthrough when no ESC answers - #594

Merged
stylesuxx merged 1 commit into
stylesuxx:developfrom
Jschmiedd:fix/passthrough-no-esc
Nov 22, 2026
Merged

stylesuxx merged 1 commit into
stylesuxx:developfrom
Jschmiedd:fix/passthrough-no-esc

Conversation

@Jschmiedd

@Jschmiedd Jschmiedd commented Nov 19, 2026 •

Copy link
Copy Markdown

Follows #593.

Problem

When the flight controller is still in 4-way passthrough (for example after the page was closed during a read) and the ESCs are not powered, connecting again fails:

  • the API version request times out (the board is still in passthrough);
  • the 4-way info then answers NOT OK, because no ESC is there;
  • hasResets stays false, so exitFourWayInterface is never sent, and the board stays in passthrough until it is power-cycled.

Fix

A NOT OK answer to the 4-way info is still an answer from the 4-way interface, so the board is in passthrough: remember it (inPassthrough) and send the exit, as already done after resets. Any other error is handled as before. Nothing changes when the board answers MSP normally.

Test

New test in src/Containers/App/__tests__/index.test.jsx: API version times out 5 times, 4-way info answers NOT OK → no reset, exit sent once with true, no "initialization failed", port stays open. Full Jest suite passes.

Bench

Tested on hardware (SpeedyBee F405 Mini, 4 × Bluejay 0.19 J-H-40) with the same change in the TrueGlide ESC tab (commit 18132c7), not on this branch: board left in passthrough with the battery unplugged, reconnect → the exit is sent (logged by the TrueGlide tab only), then MSP works and the 4 ESCs read normally once the battery is plugged in.

@codacy-production

codacy-production Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 12 complexity · 4 duplication

Metric Results
Complexity 12
Duplication 4

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

A flight controller left in passthrough answers the 4-way info with NOT OK when no ESC is powered; exit anyway so MSP works again.
@Jschmiedd
Jschmiedd force-pushed the fix/passthrough-no-esc branch from 4928ba7 to a7eb8c2 Compare November 19, 2026 21:16
@Jschmiedd
Jschmiedd marked this pull request as ready for review November 19, 2026 21:22
@stylesuxx
stylesuxx merged commit 344d65c into stylesuxx:develop Nov 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants