Skip to content

Commit

Permalink
Add a small turn before fetching for the ball (finisher_small_stadium)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkaMaul committed Jan 23, 2017
1 parent 0b26465 commit 5e5343e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/first_runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ int finisher_small_stadium(state *s, mainpos *p)
log_this(s,"\n[%s:finisher_small_stadium_1] Going to ball area\n", __FILE__);
go_to_pos(s, compute_arrival_point(s));

position ballcenter = {(S_BA_0_X+S_BA_2_X)/2,(S_BA_0_Y+S_BA_2_Y)/2};
int rel_angle_to_ball = compute_rel_angle_to_destination(s, ballcenter);
turn(s,TURNING_SPEED, rel_angle_to_ball);
update_angle(s, gyro_angle(s));

//Look for the ball
log_this(s,"\n[%s:finisher_small_stadium_1] Looking for the ball\n", __FILE__);
if (look_for_ball(s) == 0)
Expand Down

0 comments on commit 5e5343e

Please sign in to comment.