Skip to content

Resolve LedWizEquivalent outputs via CabinetOutputList (fixes PinOne + FTDI "0 of N resolved")#60

Merged
jsm174 merged 1 commit into
vpinball:masterfrom
dynajoe:fix/lwe-resolve-via-cabinetoutputs
Jul 6, 2026
Merged

Resolve LedWizEquivalent outputs via CabinetOutputList (fixes PinOne + FTDI "0 of N resolved")#60
jsm174 merged 1 commit into
vpinball:masterfrom
dynajoe:fix/lwe-resolve-via-cabinetoutputs

Conversation

@dynajoe

@dynajoe dynajoe commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Fix

LedWizEquivalent::ResolveOutputs matched output names by direct string equality, so the {controller}\{output} reference form the auto-configurators emit (PinOne, FT245R) never matched the flat physical names → Resolved 0 of N outputs → those toys never fired.

The C# original resolves via Cabinet.Outputs[OutputName], whose indexer (CabinetOutputList[Name], CabinetOutputList.cs) splits the path on \, validates the controller, and matches the output part. libdof already has a faithful port of that indexerCabinetOutputList::GetByName — but ResolveOutputs used an ad-hoc loop instead of it. Use GetByName, exactly as C# does.

Why it matters

Resolves both reference forms with one root fix, matching C#:

  • hierarchical {ctrl}\{ctrl}.NN (PinOne, FT245R) → now resolves
  • flat {ctrl}.NN (LedWiz, Pac, Pinscape, DudesCab, …) → still resolves (plain-name path)

This is the shared root cause behind the PinOne "Resolved 0 of 63" (#31) and the FTDI "fails to connect to toys" (#40) — fixed once at the resolver rather than by flattening references controller-by-controller. (Fixes the resolution half of #40; the FTDI crash reported there is separate.)

Supersedes #54 (the per-controller PinOne flatten); with this, no reference strings need changing.

Found by diffing the resolution path against the DirectOutput C# source.

…}\{output}" paths)

ResolveOutputs matched output names by direct string equality, so the "{controller}\{output}" reference form the auto-configurators emit (PinOne, FT245R) never matched the flat physical names -> "Resolved 0 of N outputs" -> those toys never fired. The C# original resolves via Cabinet.Outputs[OutputName], whose indexer splits the path on "\". Use the existing CabinetOutputList::GetByName (a faithful port of that indexer) instead of the ad-hoc loop -- this resolves both the hierarchical (PinOne/FTDI) and flat (LedWiz/Pac) reference forms, matching C#. Supersedes the per-controller flatten in vpinball#54.
@jsm174

jsm174 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Hello. Thanks for the PR!

Converting this to draft as per the contributing rules. (I was behind in getting them added as was just done in Visual Pinball).

It's going to take time to review these. libdof is currently is use by several users with a variety of devices, and we have yet to receive issues about this.

Also this definitely needs thorough testing with the actual hardware.

@jsm174
jsm174 marked this pull request as draft July 5, 2026 18:04
@jsm174
jsm174 marked this pull request as ready for review July 6, 2026 19:49
@jsm174
jsm174 merged commit 19f44de into vpinball:master Jul 6, 2026
13 checks passed
@jsm174 jsm174 mentioned this pull request Jul 6, 2026
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