Emulate up to four controllers on the UART firmware
UART protocol v3 adds a slot byte to input frames (v2 still accepted as slot 0) and slot-tagged BB 03 rumble frames. The regular firmware exposes SWITCH_PICO_UART_CONTROLLERS (default 4) Switch Pro interfaces like the AIO build. The bridge shares one serial port across controllers, maps index:port[:slot], and demuxes rumble by slot.
This commit is contained in:
parent
883eba193c
commit
b6a017eb06
14 changed files with 737 additions and 411 deletions
|
|
@ -29,8 +29,9 @@ ALL_BUTTONS = [
|
|||
|
||||
def main() -> None:
|
||||
# auto_send keeps the current state flowing in the background, so we don't
|
||||
# need to manually pump frames to the Pico.
|
||||
with SwitchUARTClient(PORT, send_interval=SEND_INTERVAL, auto_send=True) as client:
|
||||
# need to manually pump frames to the Pico. slot picks which of the Pico's
|
||||
# four emulated controllers (0-3) this script drives.
|
||||
with SwitchUARTClient(PORT, send_interval=SEND_INTERVAL, auto_send=True, slot=0) as client:
|
||||
client.neutral()
|
||||
|
||||
# Press every button/DPAD direction one-by-one, holding each briefly.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue