package org.usfirst.frc.team4272.robot2016; import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Autonomous { private final Timer time = new Timer(); private final HwRobot robot; public Autonomous(HwRobot robot) { this.robot = robot; time.reset(); time.start(); } public Control run(Control c) { // if (time.get() < 5) { // c.lDrive1 = c.lDrive2 = 0.2; // c.rDrive1 =c.rDrive2 = -0.2; // } else { // c.lDrive1 = c.rDrive1 = 0; // c.lDrive2 = c.rDrive2 = 0; // } if(Math.abs(robot.driveE.getRaw()) > 1){ c.lDrive1 = c.lDrive2 = 0; c.rDrive1 =c.rDrive2 = 0; } else { c.lDrive1 = c.lDrive2 = 0.2; c.rDrive1 =c.rDrive2 = 0.2; } SmartDashboard.putNumber("autoTime", time.get()); return c; } }