Skip to content

Commit 771db1b

Browse files
committed
Log Regigigas errors.
1 parent d747ffd commit 771db1b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

SerialPrograms/Source/PokemonSwSh/Programs/ShinyHuntAutonomous/PokemonSwSh_ShinyHuntAutonomous-Regigigas2.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "Common/Cpp/PrettyPrint.h"
88
#include "CommonFramework/Notifications/ProgramNotifications.h"
9+
#include "CommonFramework/Tools/ErrorDumper.h"
910
#include "CommonTools/Async/InferenceRoutines.h"
1011
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h"
1112
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h"
@@ -60,6 +61,7 @@ ShinyHuntAutonomousRegigigas2::ShinyHuntAutonomousRegigigas2()
6061
&ENCOUNTER_BOT_OPTIONS.NOTIFICATION_NONSHINY,
6162
&ENCOUNTER_BOT_OPTIONS.NOTIFICATION_SHINY,
6263
&NOTIFICATION_PROGRAM_FINISH,
64+
&NOTIFICATION_ERROR_RECOVERABLE,
6365
&NOTIFICATION_ERROR_FATAL,
6466
})
6567
{
@@ -139,6 +141,12 @@ void ShinyHuntAutonomousRegigigas2::program(SingleSwitchProgramEnvironment& env,
139141
if (result < 0){
140142
stats.add_error();
141143
env.update_stats();
144+
if (NOTIFICATION_ERROR_RECOVERABLE.ok_to_send_now(env.logger())){
145+
dump_image(
146+
env.logger(), env.program_info(), env.console,
147+
"Start of battle not detected after 30 seconds."
148+
);
149+
}
142150
break;
143151
}
144152
env.log("Detected battle start.");

0 commit comments

Comments
 (0)