Skip to content

Remove unused SerialPABotBase 1 message protocol headers - #1892

Merged
Mysticial merged 1 commit into
mainfrom
remove-unused-serial-pabotbase-headers
Nov 11, 2026
Merged

Mysticial merged 1 commit into
mainfrom
remove-unused-serial-pabotbase-headers

Conversation

@pa-devbot

Copy link
Copy Markdown
Collaborator

The PABotBase 1 message headers in Common/SerialPABotBase/ are no longer included by any code in Arduino-Source:

  • SerialPABotBase_Messages_HID_Keyboard.h
  • SerialPABotBase_Messages_NS1_OemControllers.h
  • SerialPABotBase_Messages_NS_WiredController.h
  • SerialPABotBase_Protocol.h

Nothing #includes the three message headers anywhere; they only appeared in the CoreLib source list in SerialPrograms/cmake/SourceFiles.cmake, which is also updated here.

SerialPABotBase_Protocol.h had one remaining reference: a stale #include in SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramComputer.cpp. The only identifier used from it (seqnum_t) appears in an #if 0 block in that file, so the include is removed.

Kept: SerialPABotBase_Protocol_IDs.h — its PABB_PID_* / PABB_CID_* macros are still used by the PABotBase 2 connection code (PABotBase2_DeviceHandle.cpp, SerialPABotBase.h/.cpp, NintendoSwitch_PABotBase2_WiredController.cpp, StandardHid_Keyboard_PABotBase2.cpp).

The same headers still exist in the Firmware repo and are left untouched there, since PABotBase 1 support hasn't been fully removed from firmware yet.

Verified with a full Linux CI-style build (pa-build, CMake+Ninja, RelWithDebInfo): compiles and links cleanly, including TestProgramComputer.cpp with the include removed.

The PABotBase 1 message headers in Common/SerialPABotBase/ are no longer included by any code:
- SerialPABotBase_Messages_HID_Keyboard.h
- SerialPABotBase_Messages_NS1_OemControllers.h
- SerialPABotBase_Messages_NS_WiredController.h
- SerialPABotBase_Protocol.h (its only remaining reference was a stale #include in TestProgramComputer.cpp; the sole use of its seqnum_t type is inside an #if 0 block)

SerialPABotBase_Protocol_IDs.h is kept: its PABB_PID_*/PABB_CID_* macros are still used by the PABotBase2 connection code (PABotBase2_DeviceHandle.cpp, SerialPABotBase.h/.cpp, NintendoSwitch_PABotBase2_WiredController.cpp, StandardHid_Keyboard_PABotBase2.cpp).

Also removes the deleted files from the CoreLib source list in SerialPrograms/cmake/SourceFiles.cmake. The equivalent files in the Firmware repo are left in place until PABotBase 1 support is fully removed from firmware.
@Mysticial
Mysticial merged commit 1377ad8 into main Nov 11, 2026
8 checks passed
@Mysticial
Mysticial deleted the remove-unused-serial-pabotbase-headers branch November 11, 2026 04:31
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