Skip to content

Commit f415c58

Browse files
committed
Nobody calls controller_type().
1 parent 246e263 commit f415c58

File tree

9 files changed

+33
-46
lines changed

9 files changed

+33
-46
lines changed

SerialPrograms/Source/Controllers/Controller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class AbstractController{
5656
// Static Information
5757

5858
virtual const char* name() = 0;
59-
virtual ControllerType controller_type() const = 0;
59+
// virtual ControllerType controller_type() const = 0;
6060
virtual ControllerClass controller_class() const = 0;
6161

6262
// Performance Metrics

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase_Descriptor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ std::unique_ptr<AbstractController> SerialPABotBase_Descriptor::make_controller(
9494
)
9595
);
9696

97+
case ControllerType::NintendoSwitch_WiredProController:
9798
case ControllerType::NintendoSwitch_WirelessProController:
9899
return std::unique_ptr<AbstractController>(
99100
new PokemonAutomation::NintendoSwitch::SerialPABotBase_ProController(

SerialPrograms/Source/Controllers/StandardHid/StandardHid_Keyboard_SerialPABotBase.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ class SerialPABotBase_Keyboard final :
4949

5050

5151
public:
52-
virtual ControllerType controller_type() const override{
53-
return ControllerType::HID_Keyboard;
54-
}
52+
// virtual ControllerType controller_type() const override{
53+
// return ControllerType::HID_Keyboard;
54+
// }
5555
virtual ControllerClass controller_class() const override{
5656
return ControllerClass::HID_Keyboard;
5757
}
58+
5859
virtual ControllerPerformanceClass performance_class() const override{
5960
return ControllerPerformanceClass::SerialPABotBase_Wired;
6061
}
61-
6262
virtual Milliseconds ticksize() const override{
6363
return Milliseconds(0);
6464
}

SerialPrograms/Source/NintendoSwitch/Controllers/SerialPABotBase/NintendoSwitch_SerialPABotBase_Joycon.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class SerialPABotBase_Joycon :
4545

4646

4747
public:
48-
virtual ControllerType controller_type() const override{
49-
return m_controller_type;
50-
}
48+
// virtual ControllerType controller_type() const override{
49+
// return m_controller_type;
50+
// }
5151

5252
virtual ControllerPerformanceClass performance_class() const override{
5353
return m_performance_class;

SerialPrograms/Source/NintendoSwitch/Controllers/SerialPABotBase/NintendoSwitch_SerialPABotBase_ProController.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class SerialPABotBase_ProController final :
4343

4444

4545
public:
46-
virtual ControllerType controller_type() const override{
47-
return m_controller_type;
48-
}
46+
// virtual ControllerType controller_type() const override{
47+
// return m_controller_type;
48+
// }
4949

5050
virtual ControllerPerformanceClass performance_class() const override{
5151
return m_performance_class;

SerialPrograms/Source/NintendoSwitch/Controllers/SerialPABotBase/NintendoSwitch_SerialPABotBase_WiredController.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ class SerialPABotBase_WiredController final :
4949

5050

5151
public:
52-
virtual ControllerType controller_type() const override{
53-
return m_controller_type;
54-
}
52+
// virtual ControllerType controller_type() const override{
53+
// return m_controller_type;
54+
// }
55+
5556
virtual ControllerPerformanceClass performance_class() const override{
5657
return ControllerPerformanceClass::SerialPABotBase_Wired;
5758
}
58-
5959
virtual Milliseconds ticksize() const override{
6060
return Milliseconds(0);
6161
}

SerialPrograms/Source/NintendoSwitch/Controllers/SysbotBase/SysbotBase3_ProController.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ class ProController_SysbotBase3 final :
3939

4040

4141
public:
42-
virtual ControllerType controller_type() const override{
43-
return ControllerType::NintendoSwitch_WiredController;
44-
}
42+
// virtual ControllerType controller_type() const override{
43+
// return ControllerType::NintendoSwitch_WiredController;
44+
// }
45+
4546
virtual ControllerPerformanceClass performance_class() const override{
4647
return ControllerPerformanceClass::SerialPABotBase_Wired;
4748
}
48-
4949
virtual Milliseconds ticksize() const override{
5050
return Milliseconds::zero();
5151
}

SerialPrograms/Source/NintendoSwitch/Controllers/SysbotBase/SysbotBase_ProController.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ class ProController_SysbotBase final :
4343

4444

4545
public:
46-
virtual ControllerType controller_type() const override{
47-
return ControllerType::NintendoSwitch_WiredController;
48-
}
46+
// virtual ControllerType controller_type() const override{
47+
// return ControllerType::NintendoSwitch_WiredController;
48+
// }
49+
4950
virtual ControllerPerformanceClass performance_class() const override{
5051
return ControllerPerformanceClass::SysbotBase;
5152
}
52-
5353
virtual Milliseconds ticksize() const override{
5454
return Milliseconds::zero();
5555
}

SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_FlyingTrialFarmer.cpp

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -240,29 +240,15 @@ void FlyingTrialFarmer::program(SingleSwitchProgramEnvironment& env, ProControll
240240
pbf_wait(context, 9 * TICKS_PER_SECOND);
241241
break;
242242
case FlightPath::BACK_ENTRY_SOFT_TURN:
243-
#if 0
244-
if (env.console.controller().controller_type() == ControllerType::NintendoSwitch_WirelessProController){
245-
pbf_wait(context, Milliseconds(3000));
246-
pbf_move_left_joystick(context, 180, get_final_y_axis(-108), Milliseconds(1005), Milliseconds(0));
247-
pbf_wait(context, Milliseconds(1995));
248-
pbf_move_left_joystick(context, 40, get_final_y_axis( -78), Milliseconds(1605), Milliseconds(0));
249-
pbf_wait(context, Milliseconds(1005));
250-
pbf_move_left_joystick(context, 110, get_final_y_axis( -78), Milliseconds(1995), Milliseconds(0));
251-
pbf_wait(context, Milliseconds(14040));
252-
pbf_move_left_joystick(context, 205, get_final_y_axis( 30), Milliseconds(735), Milliseconds(0));
253-
pbf_wait(context, Milliseconds(9000));
254-
}else{
255-
#endif
256-
pbf_wait(context, 3000ms);
257-
pbf_move_left_joystick(context, 180, get_final_y_axis(-108), 1000ms, 0ms);
258-
pbf_wait(context, 2000ms);
259-
pbf_move_left_joystick(context, 40, get_final_y_axis( -78), 1920ms, 0ms);
260-
pbf_wait(context, 1000ms);
261-
pbf_move_left_joystick(context, 110, get_final_y_axis( -78), 2000ms, 0ms);
262-
pbf_wait(context, 14000ms);
263-
pbf_move_left_joystick(context, 205, get_final_y_axis( 37), 1280ms, 0ms);
264-
pbf_wait(context, 9000ms);
265-
// }
243+
pbf_wait(context, 3000ms);
244+
pbf_move_left_joystick(context, 180, get_final_y_axis(-108), 1000ms, 0ms);
245+
pbf_wait(context, 2000ms);
246+
pbf_move_left_joystick(context, 40, get_final_y_axis( -78), 1920ms, 0ms);
247+
pbf_wait(context, 1000ms);
248+
pbf_move_left_joystick(context, 110, get_final_y_axis( -78), 2000ms, 0ms);
249+
pbf_wait(context, 14000ms);
250+
pbf_move_left_joystick(context, 205, get_final_y_axis( 37), 1280ms, 0ms);
251+
pbf_wait(context, 9000ms);
266252
break;
267253
case FlightPath::BACK_ENTRY_HARD_TURN:
268254
pbf_wait(context, 3 * TICKS_PER_SECOND);

0 commit comments

Comments
 (0)