Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
workbenchthis machine
uhubctl try-out outlasts the relay's 2.5 s light write timeout: the card shows "the arm server did not answer" while the try-out succeeds #637
Sign in to join this conversation.
new above
offline
From the review of #631.
lightHooks.writeinSoftware/so101/src/relay.tsaborts afterMath.min(readTimeoutMs, 8000), andreadTimeoutMsdefaults to 2500 ms. A uhubctlswitchnow runstrial()on the Pi inside that request. The trial is:uhubctl -l(verify),lsusb,uhubctl -l+-a off, a 2000 ms sleep,lsusb, thenuhubctl -l+-a on|off. That is always more than 2.5 s on a real Pi. So on the page (and the terminal's/grow … switch uhubctl, which goes through the same relay), the owner gets "the arm server did not answer (no answer in 2500 ms)" instead of thelightTriedflash. Meanwhile the Pi finishes the try-out and leaves the switch pending, and that only shows on the next load.Fix: give light writes their own timeout, longer than the trial (for example 10 s, like a
timeoutMsthe pump write already takes). Add a test where the stub arm answers a uhubctl switch after more than 2.5 s and the page still flasheslightTried.