Files
cc-platform-core/apis/webbridge.lua
MayaTheShy 00ac2d7d6f fix: prefer wired modems in findModem() to prevent wireless/wired mismatch
WebBridge.findModem() iterated _G.device with pairs() which has
non-deterministic order. On computers with both wired and wireless
modems, it could return the wireless modem while the manager uses
a wired modem - messages never cross the wired/wireless boundary.

Now uses two-pass iteration: first looks for wired modems, then
falls back to any modem. Peripheral scan fallback also prefers wired.
Backward-compatible: boolean arg (preferWireless) still works.
2026-03-29 01:32:37 -04:00

12 KiB