summaryrefslogtreecommitdiff
path: root/src/org/usfirst/frc/team4272/robot2015/Teleop.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/usfirst/frc/team4272/robot2015/Teleop.java')
-rw-r--r--src/org/usfirst/frc/team4272/robot2015/Teleop.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2015/Teleop.java b/src/org/usfirst/frc/team4272/robot2015/Teleop.java
index 541099c..058589a 100644
--- a/src/org/usfirst/frc/team4272/robot2015/Teleop.java
+++ b/src/org/usfirst/frc/team4272/robot2015/Teleop.java
@@ -1,6 +1,7 @@
package org.usfirst.frc.team4272.robot2015;
-import org.usfirst.frc.team4272.robotlib.Toggler;
+import org.usfirst.frc.team4272.robotlib.ToggleButton;
+import org.usfirst.frc.team4272.robotlib.PushButton;
import org.usfirst.frc.team4272.robotlib.Xbox360Controller.Axis;
import org.usfirst.frc.team4272.robotlib.Xbox360Controller.Button;
@@ -8,8 +9,9 @@ import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Relay;
public class Teleop {
- private Toggler grabButton = new Toggler();
- private Toggler pushButton = new Toggler();
+ private ToggleButton grabButton = new ToggleButton();
+ private ToggleButton pushButton = new ToggleButton();
+ private PushButton camButton = new PushButton();
public Teleop() {
}
@@ -48,6 +50,14 @@ public class Teleop {
control.grab = grabButton.update(oi.xbox.getButton(Button.A));
control.push = pushButton.update(oi.xbox.getButton(Button.B));
+
+ if (camButton.update(oi.xbox.getButton(Button.RT))) {
+ try {
+ ProcessBuilder pb = new ProcessBuilder("/home/lvuser/tweeterbot/bin/snapPhoto");
+ pb.redirectErrorStream(true);
+ pb.start();
+ } catch (Exception e) {};
+ }
return control;
}