@@ -82,7 +82,7 @@ std::unique_ptr<StatsTracker> AutoFossil_Descriptor::make_stats() const{
8282AutoFossil::AutoFossil ()
8383 : NUM_FOSSILS(" <b>How Many Fossils to Revive Before Checking Them in Box:</b>" ,
8484 LockMode::LOCK_WHILE_RUNNING,
85- 30 , 1 , 1 *30
85+ 30 , 1 , 32 *30
8686 )
8787 , WHICH_FOSSIL(
8888 " <b>Which Fossil to Choose in the Dialog Menu:</b>" ,
@@ -181,7 +181,7 @@ void AutoFossil::revive_one_fossil(SingleSwitchProgramEnvironment& env, ProContr
181181
182182 int ret = wait_until (
183183 env.console , context,
184- 10000ms ,
184+ 10s ,
185185 {
186186 buttonA_watcher,
187187 selection_arrow_watcher,
@@ -233,7 +233,7 @@ void AutoFossil::revive_one_fossil(SingleSwitchProgramEnvironment& env, ProContr
233233 env.update_stats ();
234234 OperationFailedException::fire (
235235 ErrorReport::SEND_ERROR_REPORT,
236- " revive_one_fossil(): No recognized state after 60 seconds." ,
236+ " revive_one_fossil(): No recognized state after 10 seconds." ,
237237 env.console
238238 );
239239 }
@@ -256,7 +256,15 @@ bool AutoFossil::check_fossils_in_one_box(
256256 box_detector.move_cursor (env.program_info (), env.console , context, box_row, box_col);
257257
258258 info_watcher.reset_state ();
259- wait_until (env.console , context, WallClock::max (), {info_watcher});
259+ const int ret = wait_until (env.console , context, std::chrono::seconds (10 ), {info_watcher});
260+ if (ret < 0 ) {
261+ OperationFailedException::fire (
262+ ErrorReport::SEND_ERROR_REPORT,
263+ " Failed to detect box info at cell idx " + std::to_string (i) + " after 30 seconds" ,
264+ env.console
265+ );
266+ }
267+
260268
261269 std::ostringstream os;
262270 os << num_checked_fossils_in_previous_boxes + i + 1 << " /" << NUM_FOSSILS << " : " << info_watcher.info_str ();
0 commit comments