Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
9b10474d | 3 | import edu.wpi.first.wpilibj.DoubleSolenoid; |
2a099bc6 | 4 | import edu.wpi.first.wpilibj.DoubleSolenoid.Value; |
9b10474d | 5 | |
38a404b3 KZ |
6 | /** |
7 | * The Constants stores constant values for all subsystems. This includes the | |
8 | * port values for motors and sensors, as well as important operational | |
9 | * constants for subsystems such as max and min values. | |
10 | */ | |
11 | ||
12 | public class Constants { | |
e4fbab02 HD |
13 | public final static int PCM_MODULE_A = 9; |
14 | public final static int PCM_MODULE_B = 10; | |
15 | ||
200caf63 KZ |
16 | public static class OI { |
17 | // Computer Ports | |
18 | public final static int LEFT_STICK_PORT = 0; | |
19 | public final static int RIGHT_STICK_PORT = 1; | |
2c9bcd75 | 20 | |
571a0e2a | 21 | public final static int LEFT_JOYSTICK_TRIGGER_PORT = 1; |
2c9bcd75 | 22 | |
571a0e2a HD |
23 | public final static int RIGHT_JOYSTICK_TRIGGER_PORT = 1; |
24 | public final static int RIGHT_JOYSTICK_THUMB_PORT = 2; | |
25 | public final static int RIGHT_JOYSTICK_SHOOT_PORT = 3; | |
52ef246c | 26 | |
200caf63 | 27 | } |
38a404b3 | 28 | |
200caf63 KZ |
29 | public static class DriveTrain { |
30 | // Drivetrain Motor Related Ports | |
33141cdd | 31 | public static final int FRONT_LEFT = 1; |
faabd6f8 | 32 | public static final int FRONT_RIGHT = 6; |
33141cdd | 33 | public static final int REAR_LEFT = 2; |
faabd6f8 | 34 | public static final int REAR_RIGHT = 5; |
27615e61 | 35 | |
200caf63 | 36 | // Encoder related ports |
33141cdd KZ |
37 | public final static int ENCODER_LEFT_A = 0; |
38 | public final static int ENCODER_LEFT_B = 1; | |
571a0e2a HD |
39 | public final static int ENCODER_RIGHT_A = 3; |
40 | public final static int ENCODER_RIGHT_B = 4; | |
41 | ||
42 | public static final int LEFT_MODULE = PCM_MODULE_B; | |
a68e4347 | 43 | public static final int LEFT_FORWARD = 1, LEFT_REVERSE = 6; |
571a0e2a | 44 | public static final int RIGHT_MODULE = PCM_MODULE_B; |
a68e4347 | 45 | public static final int RIGHT_FORWARD = 0, RIGHT_REVERSE = 7; |
45bdf5b9 | 46 | |
571a0e2a | 47 | public static final double INCHES_PER_PULSE = ((3.66 / 5.14) * 6 * Math.PI) / 256; |
33141cdd | 48 | |
fb75626b | 49 | public static double kp = 0.013, ki = 0.000015, kd = -0.002; |
f8bfcc62 | 50 | public static double encoderTolerance = 8.0; |
2a099bc6 KZ |
51 | |
52 | // Gearing constants | |
53 | public static final Value HIGH_GEAR = DoubleSolenoid.Value.kForward; | |
54 | public static final Value LOW_GEAR = DoubleSolenoid.Value.kReverse; | |
200caf63 | 55 | } |
38a404b3 | 56 | |
200caf63 | 57 | public static class Shooter { |
a68e4347 | 58 | public static final int CATAPULT1_MODULE = PCM_MODULE_A; |
e4fbab02 | 59 | public static final int CATAPULT1_FORWARD = 0; |
00cf1e6c | 60 | public static final int CATAPULT1_REVERSE = 1; |
a68e4347 | 61 | public static final int CATAPULT2_MODULE = PCM_MODULE_A; |
00cf1e6c HD |
62 | public static final int CATAPULT2_FORWARD = 2; |
63 | public static final int CATAPULT2_REVERSE = 3; | |
a68e4347 | 64 | // TODO Determine actual shooter ports |
e4fbab02 HD |
65 | |
66 | public static final Value shoot = Value.kForward; | |
67 | public static final Value reset = Value.kReverse; | |
68 | public static final double WAIT_TIME = 2.0; // In seconds | |
200caf63 | 69 | } |
40348cab | 70 | |
200caf63 | 71 | public static class IntakeArm { |
a68e4347 | 72 | public static final int INTAKE_ROLLER_PORT = 3; |
5cff8910 ME |
73 | |
74 | // for pistons | |
a68e4347 | 75 | public static final int LEFT_INTAKE_MODULE = PCM_MODULE_A; |
00cf1e6c HD |
76 | public static final int LEFT_INTAKE_FORWARD = 4; |
77 | public static final int LEFT_INTAKE_REVERSE = 5; | |
a68e4347 | 78 | public static final int RIGHT_INTAKE_MODULE = PCM_MODULE_A; |
00cf1e6c HD |
79 | public static final int RIGHT_INTAKE_FORWARD = 6; |
80 | public static final int RIGHT_INTAKE_REVERSE = 7; | |
a68e4347 | 81 | // TODO Determine actual intake ports |
5cff8910 | 82 | |
2781cca0 ME |
83 | public static final Value EXTEND = DoubleSolenoid.Value.kForward; |
84 | public static final Value RETRACT = DoubleSolenoid.Value.kReverse; | |
85 | ||
5cff8910 | 86 | // for roller |
200caf63 KZ |
87 | public static final double INTAKE_SPEED = 0.5; |
88 | public static final double OUTPUT_SPEED = -0.5; | |
200caf63 | 89 | } |
38a404b3 | 90 | } |