You've already forked torvalds-GuitarPedal
mirror of
https://github.com/torvalds/GuitarPedal.git
synced 2026-09-13 17:20:04 +00:00
A treadle parked at its heel stop feeds nothing back, so exp_classify() gives up on it and says UNKNOWN - which is right, because naming a jack from a reading means picking one of five and a silent wiper leaves nothing to pick from. Asking it about a treadle you have already told it about is a different and much easier question: not "what is this" but "is this still what you said", and 812/69 is exactly what a heel-down treadle looks like. So exp_verify() answers that one, per accessory, and the probe's verdict prefers it. Each accessory has a shape the pull-up pair has to fit: a switch pin is open or shorted and never resting in between, an LED clamps the ring at its forward drop whether or not the switch is down, an empty jack is both pins on the normalling contacts, and a treadle is either a wiper feeding a driven pin back or - at the stop - a supply pin dividing against the pull-up while the wiper reads the bottom. Which pin is which does not matter, so the two treadle conventions need no separate case. Asymmetric on purpose: this can confirm a wrong answer somebody typed, and cannot invent one. Setting the accessory to Nothing is how you ask it to start over, which is also the only state anything automatic will ever discover from. The app says so when nothing moved, because a menu settling on the value it was already showing is not feedback. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>