diff options
Diffstat (limited to 'src/org/usfirst/frc/team4272/robot2016/Autonomous.java')
-rw-r--r-- | src/org/usfirst/frc/team4272/robot2016/Autonomous.java | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2016/Autonomous.java b/src/org/usfirst/frc/team4272/robot2016/Autonomous.java index 756c33d..5cba22f 100644 --- a/src/org/usfirst/frc/team4272/robot2016/Autonomous.java +++ b/src/org/usfirst/frc/team4272/robot2016/Autonomous.java @@ -14,18 +14,24 @@ public class Autonomous { } public Control run(Control c) { - if (robot.armL.get()) { - c.arm = -0.5; - } else { - c.arm = 0; - robot.armE.reset(); - } - if (time.get() < 4) { - c.lDrive1 = c.rDrive1 = -0.4; - } else { - c.lDrive1 = c.rDrive1 = 0; +// 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; |