started thinking about goalie, to be tested, dunno if it works
parent
60f4878a08
commit
bc0b19ccf1
|
@ -30,7 +30,9 @@ int dir, degrees2;
|
|||
void Goalie::goalie(int plusang) {
|
||||
if(ball->distance < CATCH_DIST) drive->prepareDrive(ball->angle, 350, 0);
|
||||
else{
|
||||
if(ball->angle > 345 || ball->angle < 15) plusang *= 0.15;
|
||||
/* if(ball->angle > 345 || ball->angle < 15) plusang *= 0.15;
|
||||
FRONT */
|
||||
if (ball->angle > 345 && ball->angle < 15) plusang *= 0.15;
|
||||
if(ball->angle > 180) degrees2 = ball->angle - 360;
|
||||
else degrees2 = ball->angle;
|
||||
|
||||
|
@ -41,8 +43,10 @@ void Goalie::goalie(int plusang) {
|
|||
else dir = dir;
|
||||
|
||||
storcimentoPorta();
|
||||
if(ball->distance > TILT_DIST && (ball->angle > 340 || ball->angle < 20)) drive->prepareDrive(dir, 350, cstorc);
|
||||
else {
|
||||
if(ball->distance > TILT_DIST && (ball->angle > 340 || ball->angle < 20)){
|
||||
plusang -= 20;
|
||||
drive->prepareDrive(dir, 350, cstorc);
|
||||
} else {
|
||||
drive->prepareDrive(dir, 350, 0);
|
||||
cstorc = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue