Skip to content

Commit f9cab1c

Browse files
committed
Don't send error report if stunfisk-galar fails to disambiguate with stunfisk after using Terrain Pulse.
1 parent 2c17453 commit f9cab1c

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

SerialPrograms/Source/CommonFramework/Tools/ConsoleHandle.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,9 @@
1212

1313
namespace PokemonAutomation{
1414

15-
class CancellableScope;
16-
class AsyncDispatcher;
1715
class ThreadHandle;
1816
class BotBase;
19-
class VideoFeed;
20-
class VideoOverlay;
21-
class AudioFeed;
22-
class StreamHistorySession;
2317
class ThreadUtilizationStat;
24-
class VisualInferencePivot;
25-
class AudioInferencePivot;
2618

2719

2820
class ConsoleHandle : public VideoStream{

SerialPrograms/Source/NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace PokemonAutomation{
2020
// class BotBaseContext;
2121
namespace NintendoSwitch{
2222

23-
// Block the current thread until all the Switch commands sent to the micro controller are executed.
23+
// Wait for this many ticks on the Switch.
2424
void pbf_wait (BotBaseContext& context, uint16_t ticks);
2525
// Press a Switch controller button (excluding D-Pad). Hold the button for `hold_ticks`, then release it for `release_ticks`.
2626
// The buttons are defined in Common/NintendoSwitch/NintendoSwitch_ControllerDefs.h. Examples include BUTTON_A, BUTTON_ZL.
@@ -40,7 +40,7 @@ void pbf_press_dpad (BotBaseContext& context, DpadPosition position,
4040
// y = 128 : neutral
4141
// y = 255 : down
4242
// Example: move the joystick fully left: (x, y) = (0, 128)
43-
// move the joystick upper-right: (x, y) = (255, 0
43+
// move the joystick upper-right: (x, y) = (255, 0)
4444
void pbf_move_left_joystick (BotBaseContext& context, uint8_t x, uint8_t y, uint16_t hold_ticks, uint16_t release_ticks);
4545
// Move right joystick towards a 2D direction. Hold the direction for `hold_ticks`, then release it for `release_ticks`.
4646
// The direction is specified by (x, y):
@@ -51,7 +51,7 @@ void pbf_move_left_joystick (BotBaseContext& context, uint8_t x, uint8_t y,
5151
// y = 128 : neutral
5252
// y = 255 : down
5353
// Example: move the joystick fully left: (x, y) = (0, 128)
54-
// move the joystick upper-right: (x, y) = (255, 0
54+
// move the joystick upper-right: (x, y) = (255, 0)
5555
void pbf_move_right_joystick (BotBaseContext& context, uint8_t x, uint8_t y, uint16_t hold_ticks, uint16_t release_ticks);
5656
// Mash a Switch controller button (excluding D-Pad) repeatedly for `ticks` ticks.
5757
// The buttons are defined in Common/NintendoSwitch/NintendoSwitch_ControllerDefs.h. Examples include BUTTON_A, BUTTON_ZL.

SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramSwitch.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
267267
using namespace OCR;
268268
using namespace NintendoSwitch;
269269
using namespace Pokemon;
270-
// using namespace PokemonSwSh;
270+
using namespace PokemonSwSh;
271271
// using namespace PokemonBDSP;
272272
// using namespace PokemonLA;
273-
using namespace PokemonSV;
273+
// using namespace PokemonSV;
274274

275275
[[maybe_unused]] Logger& logger = env.logger();
276276
[[maybe_unused]] ConsoleHandle& console = env.consoles[0];
@@ -281,12 +281,15 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
281281
VideoOverlaySet overlays(overlay);
282282

283283

284-
// ImageRGB32 image("screenshot-20250113-214042699528.png");
285-
ImageRGB32 image("raidecho1.jpg");
284+
ImageRGB32 image("20250115-110356822901.png");
285+
// ImageRGB32 image("raidecho1.jpg");
286286
// auto image = feed.snapshot();
287287

288-
TeraCardReader reader;
289-
cout << (int)reader.stars(logger, env.program_info(), image) << endl;
288+
MaxLairInternal::BattleMenuReader reader(overlay, Language::English);
289+
reader.read_opponent_in_summary(logger, image);
290+
291+
// TeraCardReader reader;
292+
// cout << (int)reader.stars(logger, env.program_info(), image) << endl;
290293

291294

292295

SerialPrograms/Source/PokemonSwSh/MaxLair/Inference/PokemonSwSh_MaxLair_Detect_BattleMenu.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,14 @@ std::set<std::string> BattleMenuReader::read_opponent_in_summary(Logger& logger,
282282
}
283283
}
284284

285+
// cout << get_type_slug(type0) << endl;
286+
// cout << get_type_slug(type1) << endl;
287+
285288
for (auto iter = slugs.begin(); iter != slugs.end();){
286289
const MaxLairMon& mon = get_maxlair_mon(*iter);
287290
// cout << mon.species << endl;
291+
// cout << get_type_slug(mon.type[0]) << endl;
292+
// cout << get_type_slug(mon.type[1]) << endl;
288293
if ((type0 == mon.type[0] && type1 == mon.type[1]) || (type0 == mon.type[1] && type1 == mon.type[0])){
289294
++iter;
290295
}else{
@@ -308,6 +313,7 @@ std::set<std::string> BattleMenuReader::read_opponent_in_summary(Logger& logger,
308313
"basculin-red-striped",
309314
"lycanroc-midday",
310315
"lycanroc-midnight",
316+
"stunfisk-galar", // After using terrain pulse.
311317
};
312318
bool error = true;
313319
for (const std::string& slug : slugs){

0 commit comments

Comments
 (0)