public void driveRoom() { displayMessage("DriveRoom!"); distanceSensor.fetchSample(ultrasonicSamples, 0); if (ultrasonicSamples[0] < 5) { botPilot.travel(950.4); Delay.msDelay(turnWaitTime); botPilot.rotate(90); Delay.msDelay(turnWaitTime); botPilot.travel(3550.1); Delay.msDelay(turnWaitTime); botPilot.rotate(-90); Delay.msDelay(turnWaitTime); botPilot.travel(6000.2); Delay.msDelay(turnWaitTime); botPilot.rotate(90); Delay.msDelay(turnWaitTime); botPilot.travel(4410.4); } else { botPilot.travel(4410.4); Delay.msDelay(turnWaitTime); botPilot.rotate(-90); Delay.msDelay(turnWaitTime); botPilot.travel(6000.2); Delay.msDelay(turnWaitTime); botPilot.rotate(90); Delay.msDelay(turnWaitTime); botPilot.travel(3550.1); Delay.msDelay(turnWaitTime); botPilot.rotate(-90); Delay.msDelay(turnWaitTime); botPilot.travel(950.4); } }
public void driveRoom() { displayMessage("driveRoom"); navigation.travel(254.12); }