Changed motor direction in catch ball.
This commit is contained in:
@@ -53,7 +53,8 @@ public class CatchBallBehavior extends BaseBehavior {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void action() {
|
public void action() {
|
||||||
Motor.B.forward();
|
pilot.travel(65);
|
||||||
|
Motor.B.backward();
|
||||||
try { Thread.sleep(2000); } catch(InterruptedException e) { };
|
try { Thread.sleep(2000); } catch(InterruptedException e) { };
|
||||||
|
|
||||||
/* Turn towards the start line and start moving. */
|
/* Turn towards the start line and start moving. */
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class SearchBallBehavior extends BaseBehavior {
|
|||||||
if(turnLeft) {
|
if(turnLeft) {
|
||||||
/* Search to the left of the robot. */
|
/* Search to the left of the robot. */
|
||||||
Rotations.rotateM90(compass, pilot);
|
Rotations.rotateM90(compass, pilot);
|
||||||
pilot.travel(50);
|
pilot.travel(100);
|
||||||
|
|
||||||
if(queue.hasNextTouchSensorEvent()) {
|
if(queue.hasNextTouchSensorEvent()) {
|
||||||
/* If an obstacle is found while searching then start searching
|
/* If an obstacle is found while searching then start searching
|
||||||
@@ -127,7 +127,7 @@ public class SearchBallBehavior extends BaseBehavior {
|
|||||||
} else {
|
} else {
|
||||||
/* Search to the right of the robot. */
|
/* Search to the right of the robot. */
|
||||||
Rotations.rotate90(compass, pilot);
|
Rotations.rotate90(compass, pilot);
|
||||||
pilot.travel(50);
|
pilot.travel(100);
|
||||||
|
|
||||||
if(queue.hasNextTouchSensorEvent()) {
|
if(queue.hasNextTouchSensorEvent()) {
|
||||||
/* If an obstacle is found while searching then give up and go back
|
/* If an obstacle is found while searching then give up and go back
|
||||||
|
|||||||
Reference in New Issue
Block a user