Skip to content

Commit

Permalink
Reduce date change timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysticial committed Dec 12, 2024
1 parent 5203d6b commit dc47dcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ std::pair<DateFormat, DateTime> DateReader::read_date(Logger& logger, std::share
if (!detect(*screen)){
throw_and_log<OperationFailedException>(
logger, ErrorReport::SEND_ERROR_REPORT,
"Not on data change screen.",
"Not on date change screen.",
nullptr,
std::move(screen)
);
Expand All @@ -267,7 +267,7 @@ std::pair<DateFormat, DateTime> DateReader::read_date(Logger& logger, std::share
if (stats_window_top.stddev.sum() > 10){
throw_and_log<OperationFailedException>(
logger, ErrorReport::SEND_ERROR_REPORT,
"Not on data change screen.",
"Not on date change screen.",
nullptr,
std::move(screen)
);
Expand Down Expand Up @@ -592,7 +592,7 @@ void change_date(
HomeWatcher home;
DateChangeWatcher date_reader;
int ret = wait_until(
env.console, context, std::chrono::seconds(120),
env.console, context, std::chrono::seconds(10),
{
home,
date_reader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,39 +106,6 @@ void AutonomousBallThrower::program(SingleSwitchProgramEnvironment& env, BotBase
results.balls_used,
results.result
);

#if 0
while (true)
{
NormalBattleMenuWatcher battle_menu(COLOR_RED);
int ret = wait_until(
env.console, context,
std::chrono::seconds(120),
{
battle_menu,
}
);

context.wait_for(std::chrono::milliseconds(100));
switch (ret){
case 0:
throw_ball(env.console, context);
stats.m_balls++;
env.update_stats();
break;
default:
throw FatalProgramException(
env.console, ErrorReport::SEND_ERROR_REPORT,
"Failed to detect battle menu after 60 seconds, did you catch or fail?",
true
);
}

}
#endif

// env.update_stats();
// send_program_finished_notification(env, NOTIFICATION_PROGRAM_FINISH);
}


Expand Down

0 comments on commit dc47dcf

Please sign in to comment.