summaryrefslogtreecommitdiff
path: root/src/org/usfirst/frc/team4272/robotlib/PushButton.java
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-03-19 13:33:53 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-03-19 13:33:53 -0400
commit7080d2167ae2447ef18f3ba15d2bc39a880b4dc8 (patch)
tree50af1359ab281f6ce2051daa778855e6a75ae6d6 /src/org/usfirst/frc/team4272/robotlib/PushButton.java
parent81585537acee6e6642615fc9b5ddc14e49535f0b (diff)
stuff from Indy
Diffstat (limited to 'src/org/usfirst/frc/team4272/robotlib/PushButton.java')
-rw-r--r--src/org/usfirst/frc/team4272/robotlib/PushButton.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/org/usfirst/frc/team4272/robotlib/PushButton.java b/src/org/usfirst/frc/team4272/robotlib/PushButton.java
new file mode 100644
index 0000000..d14c5d3
--- /dev/null
+++ b/src/org/usfirst/frc/team4272/robotlib/PushButton.java
@@ -0,0 +1,13 @@
+package org.usfirst.frc.team4272.robotlib;
+
+public class PushButton {
+ private boolean prev = false;
+ public boolean update(boolean next) {
+ boolean ret = false;
+ if (next && ! prev) {
+ ret = true;
+ }
+ prev = next;
+ return ret;
+ }
+}