Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flying Trial Farmer: Increase Y button detection range for French profiles #389

Merged
merged 1 commit into from
Dec 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void FlyingTrialFarmer::program(SingleSwitchProgramEnvironment& env, BotBaseCont
env.log("Black screen detected. Trial starting.");
}

WhiteButtonWatcher whitebutton(COLOR_GREEN, WhiteButton::ButtonY, {0.45, 0.85, 0.10, 0.14});
WhiteButtonWatcher whitebutton(COLOR_GREEN, WhiteButton::ButtonY, {0.40, 0.85, 0.20, 0.14});
context.wait_for_all_requests();
int ret_trial_start = wait_until(
env.console, context,
Expand All @@ -140,13 +140,13 @@ void FlyingTrialFarmer::program(SingleSwitchProgramEnvironment& env, BotBaseCont
if (ret_trial_start == 0) {
env.log("Countdown is over. Start navigation sequence.");
pbf_wait(context, 3 * TICKS_PER_SECOND);
pbf_move_left_joystick(context, 180, 20, 1 * TICKS_PER_SECOND, 0); // go through the 2nd ring
pbf_move_left_joystick(context, 180, 20, 1 * TICKS_PER_SECOND, 0); // go through the 2nd ring for additional time
pbf_wait(context, 2 * TICKS_PER_SECOND);
pbf_move_left_joystick(context, 40, 50, 240, 0);
pbf_move_left_joystick(context, 40, 50, 240, 0); // adjust horizontal angle while gaining height
pbf_wait(context, 1 * TICKS_PER_SECOND);
pbf_move_left_joystick(context, 128, 50, 2 * TICKS_PER_SECOND, 0); // adjust vertical height
pbf_move_left_joystick(context, 128, 50, 2 * TICKS_PER_SECOND, 0); // adjust vertical height to cross mountain
pbf_wait(context, 13 * TICKS_PER_SECOND);
pbf_move_left_joystick(context, 128, 180, 2 * TICKS_PER_SECOND, 0);
pbf_move_left_joystick(context, 128, 180, 2 * TICKS_PER_SECOND, 0); // descend for the gate
pbf_wait(context, 9 * TICKS_PER_SECOND);
}

Expand Down