Skip to content

Commit cbe61f6

Browse files
committed
Add support for the split Pico W modes.
1 parent 2f94779 commit cbe61f6

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

Common/SerialPABotBase/SerialPABotBase_Protocol_IDs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
#define PABB_PID_PABOTBASE_ESP32S3 0x12
3333

3434
// Raspberry Pi
35-
#define PABB_PID_PABOTBASE_PicoW 0x20
35+
#define PABB_PID_PABOTBASE_PicoW_USB 0x20
36+
#define PABB_PID_PABOTBASE_PicoW_UART 0x21
3637

3738

3839
//

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase.cpp

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ std::string program_name(uint8_t id){
4343
case PABB_PID_PABOTBASE_ESP32: return "PABotBase-ESP32";
4444
case PABB_PID_PABOTBASE_ESP32S3: return "PABotBase-ESP32-S3";
4545

46-
case PABB_PID_PABOTBASE_PicoW: return "PABotBase-PicoW";
46+
case PABB_PID_PABOTBASE_PicoW_USB: return "PABotBase-PicoW (USB)";
47+
case PABB_PID_PABOTBASE_PicoW_UART: return "PABotBase-PicoW (UART)";
4748

4849
default: return "Unknown ID";
4950
}
@@ -176,7 +177,31 @@ const std::map<
176177
ControllerFeature::NintendoSwitch_RightJoycon,
177178
}},
178179
}},
179-
{PABB_PID_PABOTBASE_PicoW, {
180+
{PABB_PID_PABOTBASE_PicoW_USB, {
181+
{ControllerType::NintendoSwitch_WirelessProController, {
182+
ControllerFeature::TickPrecise,
183+
ControllerFeature::NintendoSwitch_ProController,
184+
}},
185+
{ControllerType::NintendoSwitch_LeftJoycon, {
186+
ControllerFeature::TickPrecise,
187+
ControllerFeature::NintendoSwitch_LeftJoycon,
188+
}},
189+
{ControllerType::NintendoSwitch_RightJoycon, {
190+
ControllerFeature::TickPrecise,
191+
ControllerFeature::NintendoSwitch_RightJoycon,
192+
}},
193+
}},
194+
{PABB_PID_PABOTBASE_PicoW_UART, {
195+
{ControllerType::NintendoSwitch_WiredController, {
196+
ControllerFeature::TickPrecise,
197+
ControllerFeature::NintendoSwitch_ProController,
198+
ControllerFeature::NintendoSwitch_DateSkip,
199+
}},
200+
{ControllerType::NintendoSwitch2_WiredController, {
201+
ControllerFeature::TickPrecise,
202+
ControllerFeature::NintendoSwitch_ProController,
203+
ControllerFeature::NintendoSwitch_DateSkip,
204+
}},
180205
{ControllerType::NintendoSwitch_WirelessProController, {
181206
ControllerFeature::TickPrecise,
182207
ControllerFeature::NintendoSwitch_ProController,

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase_PostConnectActions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ void run_post_connect_actions(
215215
){
216216
switch (program_id){
217217
case PABB_PID_PABOTBASE_ESP32:
218-
case PABB_PID_PABOTBASE_PicoW:
218+
case PABB_PID_PABOTBASE_PicoW_USB:
219+
case PABB_PID_PABOTBASE_PicoW_UART:
219220
run_post_connect_actions_ESP32(status, device_name, botbase, change_controller, clear_settings);
220221
return;
221222
case PABB_PID_PABOTBASE_ESP32S3:

0 commit comments

Comments
 (0)