Skip to content

Commit 629b61f

Browse files
committed
Enable LGPE legendary reset. Update to new firmware.
1 parent e063435 commit 629b61f

File tree

4 files changed

+43
-49
lines changed

4 files changed

+43
-49
lines changed

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace PokemonAutomation{
2626
const bool IS_BETA_VERSION = true;
2727
const int PROGRAM_VERSION_MAJOR = 0;
2828
const int PROGRAM_VERSION_MINOR = 53;
29-
const int PROGRAM_VERSION_PATCH = 6;
29+
const int PROGRAM_VERSION_PATCH = 7;
3030

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

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase.cpp

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -92,69 +92,74 @@ const std::map<
9292
std::map<ControllerType, ControllerFeatures>
9393
>
9494
> SUPPORTED_VERSIONS{
95-
{2025040500, {
96-
{PABB_PID_PABOTBASE_ArduinoUnoR3, {
97-
{ControllerType::NintendoSwitch_WiredProController, {
95+
{2025061200, {
96+
{PABB_PID_PABOTBASE_ESP32, {
97+
{ControllerType::NintendoSwitch_WirelessProController, {
9898
ControllerFeature::TickPrecise,
99+
ControllerFeature::TimingFlexibleMilliseconds,
99100
ControllerFeature::NintendoSwitch_ProController,
100-
ControllerFeature::NintendoSwitch_DateSkip,
101+
}},
102+
{ControllerType::NintendoSwitch_LeftJoycon, {
103+
ControllerFeature::TickPrecise,
104+
ControllerFeature::TimingFlexibleMilliseconds,
105+
ControllerFeature::NintendoSwitch_LeftJoycon,
106+
}},
107+
{ControllerType::NintendoSwitch_RightJoycon, {
108+
ControllerFeature::TickPrecise,
109+
ControllerFeature::TimingFlexibleMilliseconds,
110+
ControllerFeature::NintendoSwitch_RightJoycon,
101111
}},
102112
}},
103-
{PABB_PID_PABOTBASE_ArduinoLeonardo, {
113+
}},
114+
{2025061300, {
115+
{PABB_PID_PABOTBASE_ESP32S3, {
104116
{ControllerType::NintendoSwitch_WiredProController, {
105117
ControllerFeature::TickPrecise,
118+
ControllerFeature::TimingFlexibleMilliseconds,
106119
ControllerFeature::NintendoSwitch_ProController,
107120
ControllerFeature::NintendoSwitch_DateSkip,
108121
}},
109122
}},
110-
{PABB_PID_PABOTBASE_ProMicro, {
123+
}},
124+
{2025061402, {
125+
{PABB_PID_PABOTBASE_ArduinoUnoR3, {
111126
{ControllerType::NintendoSwitch_WiredProController, {
112127
ControllerFeature::TickPrecise,
128+
ControllerFeature::TimingFlexibleMilliseconds,
113129
ControllerFeature::NintendoSwitch_ProController,
114130
ControllerFeature::NintendoSwitch_DateSkip,
115131
}},
116132
}},
117-
{PABB_PID_PABOTBASE_Teensy2, {
133+
{PABB_PID_PABOTBASE_ArduinoLeonardo, {
118134
{ControllerType::NintendoSwitch_WiredProController, {
119135
ControllerFeature::TickPrecise,
136+
ControllerFeature::TimingFlexibleMilliseconds,
120137
ControllerFeature::NintendoSwitch_ProController,
121138
ControllerFeature::NintendoSwitch_DateSkip,
122139
}},
123140
}},
124-
{PABB_PID_PABOTBASE_TeensyPP2, {
141+
{PABB_PID_PABOTBASE_ProMicro, {
125142
{ControllerType::NintendoSwitch_WiredProController, {
126143
ControllerFeature::TickPrecise,
144+
ControllerFeature::TimingFlexibleMilliseconds,
127145
ControllerFeature::NintendoSwitch_ProController,
128146
ControllerFeature::NintendoSwitch_DateSkip,
129147
}},
130148
}},
131-
}},
132-
{2025041403, {
133-
{PABB_PID_PABOTBASE_ESP32S3, {
149+
{PABB_PID_PABOTBASE_Teensy2, {
134150
{ControllerType::NintendoSwitch_WiredProController, {
135151
ControllerFeature::TickPrecise,
136152
ControllerFeature::TimingFlexibleMilliseconds,
137153
ControllerFeature::NintendoSwitch_ProController,
138154
ControllerFeature::NintendoSwitch_DateSkip,
139155
}},
140156
}},
141-
}},
142-
{2025042601, {
143-
{PABB_PID_PABOTBASE_ESP32, {
144-
{ControllerType::NintendoSwitch_WirelessProController, {
157+
{PABB_PID_PABOTBASE_TeensyPP2, {
158+
{ControllerType::NintendoSwitch_WiredProController, {
145159
ControllerFeature::TickPrecise,
146160
ControllerFeature::TimingFlexibleMilliseconds,
147161
ControllerFeature::NintendoSwitch_ProController,
148-
}},
149-
{ControllerType::NintendoSwitch_LeftJoycon, {
150-
ControllerFeature::TickPrecise,
151-
ControllerFeature::TimingFlexibleMilliseconds,
152-
ControllerFeature::NintendoSwitch_LeftJoycon,
153-
}},
154-
{ControllerType::NintendoSwitch_RightJoycon, {
155-
ControllerFeature::TickPrecise,
156-
ControllerFeature::TimingFlexibleMilliseconds,
157-
ControllerFeature::NintendoSwitch_RightJoycon,
162+
ControllerFeature::NintendoSwitch_DateSkip,
158163
}},
159164
}},
160165
}},

SerialPrograms/Source/NintendoSwitch/Controllers/SerialPABotBase/NintendoSwitch_SerialPABotBase_PokkenController.cpp

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class ExtendedLengthCounter{
247247
};
248248

249249

250-
250+
#if 0
251251
class TickRateTracker{
252252
public:
253253
TickRateTracker(double expected_ticks_per_second)
@@ -306,7 +306,7 @@ class TickRateTracker{
306306

307307
// CircularBuffer<double> m_history;
308308
};
309-
309+
#endif
310310

311311

312312
void SerialPABotBase_PokkenController::status_thread(){
@@ -345,7 +345,7 @@ void SerialPABotBase_PokkenController::status_thread(){
345345

346346

347347
ExtendedLengthCounter clock_tracker;
348-
TickRateTracker tick_rate_tracker(m_use_milliseconds ? 1000 : TICKS_PER_SECOND);
348+
// TickRateTracker tick_rate_tracker(m_use_milliseconds ? 1000 : TICKS_PER_SECOND);
349349
WallClock next_ping = current_time();
350350
while (true){
351351
if (m_stopping.load(std::memory_order_relaxed) || !m_handle.is_ready()){
@@ -361,25 +361,16 @@ void SerialPABotBase_PokkenController::status_thread(){
361361
).convert<PABB_MSG_ACK_REQUEST_I32>(logger(), response);
362362
last_ack.store(current_time(), std::memory_order_relaxed);
363363
uint64_t wallclock = clock_tracker.push_short_value(response.data);
364-
double ticks_per_second = tick_rate_tracker.push_ticks(wallclock);
364+
// double ticks_per_second = tick_rate_tracker.push_ticks(wallclock);
365365

366-
if (wallclock == 0){
367-
m_handle.set_status_line1(
368-
"Not connected to Switch.",
369-
COLOR_RED
370-
);
371-
}else{
372-
m_handle.set_status_line1(
373-
"Ticks / Second: " + tostr_fixed(ticks_per_second, 3),
374-
tick_rate_tracker.consecutive_off_readings() == 0
375-
? theme_friendly_darkblue()
376-
: COLOR_RED
377-
);
378-
}
366+
m_handle.set_status_line1(
367+
"Device Clock: " + tostr_u_commas(wallclock),
368+
theme_friendly_darkblue()
369+
);
379370

380-
if (tick_rate_tracker.consecutive_off_readings() >= 10){
381-
error = "Tick rate is erratic. Arduino/Teensy is not reliable on Switch 2.";
382-
}
371+
// if (tick_rate_tracker.consecutive_off_readings() >= 10){
372+
// error = "Tick rate is erratic. Arduino/Teensy is not reliable on Switch 2.";
373+
// }
383374

384375
}catch (OperationCancelledException&){
385376
break;

SerialPrograms/Source/PokemonLGPE/PokemonLGPE_Panels.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
3838
ret.emplace_back(make_single_switch_program<AlolanTrade_Descriptor, AlolanTrade>());
3939
ret.emplace_back(make_single_switch_program<FossilRevival_Descriptor, FossilRevival>());
4040
ret.emplace_back(make_single_switch_program<GiftReset_Descriptor, GiftReset>());
41-
if (IS_BETA_VERSION || PreloadSettings::instance().DEVELOPER_MODE) {
42-
ret.emplace_back(make_single_switch_program<LegendaryReset_Descriptor, LegendaryReset>());
43-
}
41+
ret.emplace_back(make_single_switch_program<LegendaryReset_Descriptor, LegendaryReset>());
4442

4543
if (PreloadSettings::instance().DEVELOPER_MODE){
4644
ret.emplace_back("---- Developer Tools ----");

0 commit comments

Comments
 (0)