Skip to content

Commit 1361390

Browse files
committed
Increase boxes in map detection.
1 parent 15f6591 commit 1361390

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramSwitch.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
294294

295295
// MoveEffectivenessSymbolMatcher::NoEffect();
296296

297+
#if 0
298+
auto snapshot = feed.snapshot();
299+
ImageViewRGB32 cropped = extract_box_reference(snapshot, ImageFloatBox(0.309013, 0.719466, 0.418455, 0.015267));
300+
ImageStats stats = image_stats(cropped);
301+
cout << stats.average << stats.stddev << endl;
302+
#endif
303+
304+
297305
#if 0
298306
MapIconDetector detector0(COLOR_RED, MapIconType::PokemonCenter, {0, 0, 1, 1}, &overlay);
299307
MapIconDetector detector1(COLOR_RED, MapIconType::Building, {0, 0, 1, 1}, &overlay);
@@ -320,7 +328,7 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
320328

321329
auto snapshot = feed.snapshot();
322330

323-
MapDetector detector(COLOR_RED, &overlay);
331+
ItemReceiveDetector detector(COLOR_RED, &overlay);
324332
cout << detector.detect(snapshot) << endl;
325333
#endif
326334

SerialPrograms/Source/PokemonLZA/Inference/PokemonLZA_MapDetector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ MapDetector::MapDetector(Color color, VideoOverlay* overlay)
2222
, m_x_button(
2323
color,
2424
ButtonType::ButtonX,
25-
{0.004292, 0.208015, 0.028970, 0.049618},
25+
{0.005000, 0.150000, 0.025000, 0.110000},
2626
overlay
2727
)
2828
, m_y_button(
2929
color,
3030
ButtonType::ButtonY,
31-
{0.004292, 0.276718, 0.028970, 0.047710},
31+
{0.005000, 0.210000, 0.025000, 0.110000},
3232
overlay
3333
)
3434
{}

SerialPrograms/Source/PokemonLZA/Programs/ShinyHunting/PokemonLZA_ShinyHunt_BenchSit.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,17 @@ void ShinyHunt_BenchSit::program(SingleSwitchProgramEnvironment& env, ProControl
129129
continue;
130130
}
131131

132-
// Wait for the day/night transition to finish.
133-
context.wait_for(std::chrono::milliseconds(2000));
132+
pbf_mash_button(context, BUTTON_B, 1000ms);
134133

135-
if (SHINY_DETECTED.on_shiny_sound(
134+
bool exit = SHINY_DETECTED.on_shiny_sound(
136135
env, env.console, context,
137136
stats.shinies,
138137
shiny_coefficient
139-
)){
138+
);
139+
140+
pbf_move_left_joystick(context, 128, 255, WALK_FORWARD_DURATION, 0ms);
141+
142+
if (exit){
140143
break;
141144
}
142145
}

0 commit comments

Comments
 (0)