package org.usfirst.frc.team4272.robot2015; import edu.wpi.first.wpilibj.Timer; public class Autonomous { private final Timer time = new Timer(); private final HwRobot robot; public Autonomous(HwRobot robot) { this.robot = robot; time.reset(); time.start(); robot.rDriveE.reset(); robot.lDriveE.reset(); } public Control run(Control c) { if (robot.rDriveE.getDistance() < (15.5*140*1.1)) { c.rDrive = c.lDrive = -0.7; } else { c.rDrive = c.lDrive = 0; } return c; } }