projects
/
3501
/
2017steamworks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e2e9a7a
)
add Motor value in constants
author
Shivani Ghanta
<shivani.oghanta@gmail.com>
Wed, 18 Jan 2017 03:59:52 +0000
(19:59 -0800)
committer
Shivani Ghanta
<shivani.oghanta@gmail.com>
Sat, 21 Jan 2017 22:27:37 +0000
(14:27 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/Constants.java
b/src/org/usfirst/frc/team3501/robot/Constants.java
index a3e3e429dd76482b2cbb4610f570d0ffec86b9d3..911bfdca53cc26cadb60b87c6069050331cdcb69 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Constants.java
+++ b/
src/org/usfirst/frc/team3501/robot/Constants.java
@@
-10,7
+10,7
@@
public class Constants {
public static class OI {
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 1;
public static class OI {
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 1;
- public final static int
TOGGLE_WINCH_PORT = 0;
+ public final static int TOGGLE_WINCH_PORT = 0;
}
public static class DriveTrain {
}
public static class DriveTrain {
@@
-27,6
+27,12
@@
public class Constants {
public static final int ENCODER_RIGHT_B = 3;
}
public static final int ENCODER_RIGHT_B = 3;
}
+ public static class Climber {
+ // MOTOR CONTROLLERS
+ public static final int MOTOR_VAL = 1;
+
+ }
+
public static enum Direction {
LEFT, RIGHT, DOWN, UP, FORWARD, BACKWARD;
}
public static enum Direction {
LEFT, RIGHT, DOWN, UP, FORWARD, BACKWARD;
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
index 54df317ea3d7a88b2b82356db9205b4a2eb279f2..eda932a5467996a08fdc46d98f49eb786f73c613 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
@@
-2,8
+2,7
@@
package org.usfirst.frc.team3501.robot.commands.climber;
import org.usfirst.frc.team3501.robot.Robot;
import org.usfirst.frc.team3501.robot.Robot;
-import com.sun.glass.ui.Timer;
-
+import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
index bb2a74e8398aeefc7a2a104a01822af6197b1967..eef39671914b5a5cc71288d14c9f34d797b5d272 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
@@
-23,6
+23,7
@@
public class RunWinchContinuous extends Command {
private double motorVal;
public RunWinchContinuous(double motorVal) {
private double motorVal;
public RunWinchContinuous(double motorVal) {
+ requires(Robot.getClimber());
this.motorVal = motorVal;
}
this.motorVal = motorVal;
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
index 903f22b94488c57bb6bdee942894ef6f4b40e084..892d2ddfb2c726a90814d39bc7c0b2c00a1ba344 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
@@
-15,6
+15,8
@@
import edu.wpi.first.wpilibj.command.Command;
public class StopWinch extends Command {
public StopWinch() {
public class StopWinch extends Command {
public StopWinch() {
+ requires(Robot.getClimber());
+
}
@Override
}
@Override
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
index 9dd7361ba83d3b2da383834f0150aa86696ca345..3d49f90be48f17f96ef93f6a4c550030697265a2 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
@@
-1,10
+1,17
@@
package org.usfirst.frc.team3501.robot.subsystems;
package org.usfirst.frc.team3501.robot.subsystems;
-public class Climber {
+import org.usfirst.frc.team3501.robot.Constants;
+
+import com.ctre.CANTalon;
+
+import edu.wpi.first.wpilibj.command.Subsystem;
+
+public class Climber extends Subsystem {
private static Climber climber;
private static Climber climber;
+ private final CANTalon motor;
private Climber() {
private Climber() {
-
+ motor = new CANTalon(Constants.Climber.MOTOR);
}
public static Climber getClimber() {
}
public static Climber getClimber() {
@@
-19,6
+26,7
@@
public class Climber {
}
public void setMotorValue(final double val) {
}
public void setMotorValue(final double val) {
+ motor.set(MOTOR);
}
}
}
}