Skip to content

Commit 90856f1

Browse files
committed
more updates to clear_dialog
1 parent 7115475 commit 90856f1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ void clear_dialog(VideoStream& stream, ProControllerContext& context,
151151

152152
if (mode == ClearDialogMode::STOP_TIMEOUT || !press_A){
153153
context.wait_for(Seconds(seconds_timeout));
154-
}else{ // press A every 30 seconds, until we time out.
155-
auto button_press_period = Seconds(30);
154+
}else{ // press A every 25 seconds, until we time out.
155+
auto button_press_period = Seconds(25);
156156
while (true){
157-
if (current_time() - start_inference + button_press_period > Seconds(seconds_timeout)){
157+
if (current_time() - start_inference > Seconds(seconds_timeout)){
158158
break;
159159
}
160160
context.wait_for(button_press_period);

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ void clear_tutorial(VideoStream& stream, ProControllerContext& context, uint16_t
124124
// stop depending on ClearDialogMode: stop when detect overworld, or dialog prompt, or A button prompt. Or if times out
125125
// throw exception if times out, unless this is the intended stop condition.
126126
// also throw exception if dialog is never detected.
127+
// NOTE: seconds_timeout is rounded up to a multiple of 25, unless press_A is false or ClearDialogMode == STOP_TIMEOUT
127128
void clear_dialog(VideoStream& stream, ProControllerContext& context,
128-
ClearDialogMode mode, uint16_t seconds_timeout = 65,
129+
ClearDialogMode mode, uint16_t seconds_timeout = 75,
129130
std::vector<CallbackEnum> optional_callbacks = {},
130131
bool press_A = true
131132
);

0 commit comments

Comments
 (0)