Skip to content

Commit d70b22f

Browse files
committed
More cleanup + version number.
1 parent 736fbc8 commit d70b22f

File tree

5 files changed

+14
-37
lines changed

5 files changed

+14
-37
lines changed

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ namespace PokemonAutomation{
2525

2626
const bool IS_BETA_VERSION = true;
2727
const int PROGRAM_VERSION_MAJOR = 0;
28-
const int PROGRAM_VERSION_MINOR = 56;
29-
const int PROGRAM_VERSION_PATCH = 6;
28+
const int PROGRAM_VERSION_MINOR = 57;
29+
const int PROGRAM_VERSION_PATCH = 1;
3030

3131
const std::string PROGRAM_VERSION_BASE =
3232
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,6 @@ const std::map<uint32_t, std::set<pabb_ProgramID>>& SUPPORTED_VERSIONS(){
4343

4444

4545

46-
47-
std::string program_name(uint32_t id){
48-
switch (id){
49-
case PABB_PID_UNSPECIFIED: return "None";
50-
51-
// Old (fat) PABotBase with scheduler.
52-
case PABB_PID_PABOTBASE_12KB: return "PABotBase-AVR8-12KB";
53-
case PABB_PID_PABOTBASE_31KB: return "PABotBase-AVR8-31KB";
54-
55-
// New (slim) PABotBase.
56-
case PABB_PID_PABOTBASE_ArduinoUnoR3: return "PABotBase-UnoR3";
57-
case PABB_PID_PABOTBASE_ArduinoLeonardo: return "PABotBase-Leonardo";
58-
case PABB_PID_PABOTBASE_ProMicro: return "PABotBase-ProMicro";
59-
case PABB_PID_PABOTBASE_Teensy2: return "PABotBase-Teensy2.0";
60-
case PABB_PID_PABOTBASE_TeensyPP2: return "PABotBase-Teensy++2.0";
61-
62-
case PABB_PID_PABOTBASE_CH552: return "PABotBase-CH552";
63-
64-
case PABB_PID_PABOTBASE_ESP32: return "PABotBase-ESP32";
65-
case PABB_PID_PABOTBASE_ESP32S3: return "PABotBase-ESP32-S3";
66-
67-
case PABB_PID_PABOTBASE_PicoW_USB: return "PABotBase-PicoW (USB)";
68-
case PABB_PID_PABOTBASE_PicoW_UART: return "PABotBase-PicoW (UART)";
69-
70-
default: return "Unknown ID";
71-
}
72-
}
7346
ControllerType id_to_controller_type(uint32_t id){
7447
switch (id){
7548
case PABB_CID_NONE:

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <string>
1212
#include <set>
1313
#include <map>
14+
#include "Common/SerialPABotBase/SerialPABotBase_Protocol_IDs.h"
1415
#include "Controllers/ControllerTypes.h"
1516

1617
namespace PokemonAutomation{
@@ -25,7 +26,6 @@ const std::map<uint32_t, std::set<pabb_ProgramID>>& SUPPORTED_VERSIONS();
2526

2627

2728

28-
std::string program_name(uint32_t id);
2929
ControllerType id_to_controller_type(uint32_t id);
3030
uint32_t controller_type_to_id(ControllerType controller_type);
3131

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase_Connection.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,17 @@ ControllerModeStatus SerialPABotBase_Connection::process_device(
264264
// Queue Size
265265
process_queue_size();
266266

267-
// Controller Type
268-
ControllerType current_controller = get_controller_type(controllers);
267+
// Current Controller
268+
ControllerType current_controller;
269+
{
270+
m_logger.log("Reading Controller Mode...");
271+
uint32_t type_id = read_controller_mode(*m_botbase);
272+
current_controller = id_to_controller_type(type_id);
273+
m_logger.Logger::log("Reading Controller Mode... Mode = " + CONTROLLER_TYPE_STRINGS.get_string(current_controller));
274+
}
275+
276+
// // Controller Type
277+
// ControllerType current_controller = get_controller_type(controllers);
269278

270279
// Run any post-connection actions specific to this program.
271280
ControllerModeStatus ret{current_controller, controllers};

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ class ProController_SysbotBase3 final :
4343
return ControllerType::NintendoSwitch_WiredController;
4444
}
4545
virtual ControllerPerformanceClass performance_class() const override{
46-
// TODO: Change to SerialPABotBase_Wired when we prove it is stable.
4746
return ControllerPerformanceClass::SerialPABotBase_Wired;
48-
// return ControllerPerformanceClass::SysbotBase;
4947
}
5048

5149
virtual Milliseconds ticksize() const override{
@@ -55,10 +53,7 @@ class ProController_SysbotBase3 final :
5553
return Milliseconds(8);
5654
}
5755
virtual Milliseconds timing_variation() const override{
58-
// TODO: Verify it is actually this stable.
5956
return ConsoleSettings::instance().TIMING_OPTIONS.WIRED_MICROCONTROLLER;
60-
// return ConsoleSettings::instance().TIMING_OPTIONS.SYSBOTBASE;
61-
// return Milliseconds(8);
6257
}
6358
virtual bool atomic_multibutton() const override{
6459
return true;

0 commit comments

Comments
 (0)