Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
df8c00f0 AD |
3 | import edu.wpi.first.wpilibj.DoubleSolenoid; |
4 | import edu.wpi.first.wpilibj.DoubleSolenoid.Value; | |
bf921ece CZ |
5 | import edu.wpi.first.wpilibj.SPI; |
6 | ||
38a404b3 KZ |
7 | /** |
8 | * The Constants stores constant values for all subsystems. This includes the | |
9 | * port values for motors and sensors, as well as important operational | |
10 | * constants for subsystems such as max and min values. | |
11 | */ | |
12 | ||
13 | public class Constants { | |
d17d868d | 14 | public static class OI { |
6b4ab3d7 CZ |
15 | public final static int LEFT_STICK_PORT = 0; |
16 | public final static int RIGHT_STICK_PORT = 1; | |
cef1f36d RR |
17 | |
18 | // Need to fill in the port numbers of the following buttons | |
14ff5362 | 19 | public final static int TOGGLE_WINCH_PORT = 0; |
5e93f308 CZ |
20 | public final static int TOGGLE_FLYWHEEL_PORT = 4; |
21 | public final static int RUN_INDEXWHEEL_PORT = 1; | |
0a4e4ffd | 22 | public final static int REVERSE_INDEXWHEEL_PORT = 2; |
8e04baaf | 23 | public final static int TOGGLE_GEAR_PORT = 5; |
5e93f308 | 24 | public final static int RUN_INTAKE_PORT = 1; |
0a4e4ffd | 25 | public final static int REVERSE_INTAKE_PORT = 4; |
5e93f308 CZ |
26 | public static final int INCREASE_SHOOTER_SPEED_PORT = 6; |
27 | public static final int DECREASE_SHOOTER_SPEED_PORT = 2; | |
d17d868d | 28 | } |
38a404b3 | 29 | |
f91f2b55 | 30 | public static class Shooter { |
31 | // MOTOR CONTROLLERS | |
5e93f308 CZ |
32 | public static final int FLY_WHEEL1 = 5; |
33 | public static final int FLY_WHEEL2 = 6; | |
34 | public static final int INDEX_WHEEL = 7; | |
268b0048 | 35 | |
0a4e4ffd | 36 | public final static int HALL_EFFECT_PORT = 9; |
e74e5e9d SG |
37 | } |
38 | ||
d17d868d | 39 | public static class DriveTrain { |
df8c00f0 | 40 | // GEARS |
5e93f308 | 41 | public static final int PISTON_MODULE = 10, LEFT_GEAR_PISTON_FORWARD = 0, |
8e04baaf CZ |
42 | LEFT_GEAR_PISTON_REVERSE = 1, RIGHT_GEAR_PISTON_FORWARD = 2, |
43 | RIGHT_GEAR_PISTON_REVERSE = 3; | |
df8c00f0 AD |
44 | public static final Value HIGH_GEAR = DoubleSolenoid.Value.kForward; |
45 | public static final Value LOW_GEAR = DoubleSolenoid.Value.kReverse; | |
46 | ||
d17d868d | 47 | // MOTOR CONTROLLERS |
68301d98 CZ |
48 | public static final int FRONT_LEFT = 1; |
49 | public static final int FRONT_RIGHT = 3; | |
50 | public static final int REAR_LEFT = 2; | |
b06733de | 51 | public static final int REAR_RIGHT = 4; |
38a404b3 | 52 | |
d17d868d | 53 | // ENCODERS |
93b4c266 CZ |
54 | public static final int ENCODER_LEFT_A = 1; |
55 | public static final int ENCODER_LEFT_B = 0; | |
b06733de CZ |
56 | public static final int ENCODER_RIGHT_A = 2; |
57 | public static final int ENCODER_RIGHT_B = 3; | |
bf921ece | 58 | |
9ebcdccb | 59 | // PID TUNING |
37eb4826 | 60 | |
d0b0d55d E |
61 | public static final String DRIVE_P_Val = "DriveP"; |
62 | public static final String DRIVE_I_Val = "DriveI"; | |
63 | public static final String DRIVE_D_Val = "DriveD"; | |
64 | public static final String DRIVE_TARGET_DIST = "SET_DIST"; | |
aafec34f | 65 | public static final String DRIVE_MOTOR_VAL = "SPEED"; |
d0b0d55d E |
66 | public static final String GYRO_P_Val = "GyroP"; |
67 | public static final String GYRO_I_Val = "GyroI"; | |
68 | public static final String GYRO_D_Val = "GyroD"; | |
69 | public static final String GYRO_TARGET_ANGLE = "SET_ANGLE"; | |
8b9698e0 | 70 | public static final int PID_ERROR = -1; |
aafec34f | 71 | public static final int TARGET_DISTANCE_ERROR = -1; |
8b9698e0 | 72 | |
886f4676 E |
73 | public static final String P_Val = "P"; |
74 | public static final String I_Val = "I"; | |
75 | public static final String D_Val = "D"; | |
76 | public static final String TARGET_DIST = "SETPOINT"; | |
3d028b3b | 77 | public static final String MOTOR_VAL = "SPEED"; |
bf921ece | 78 | public static final SPI.Port GYRO_PORT = SPI.Port.kOnboardCS0; |
9818e078 | 79 | |
d17d868d | 80 | } |
fa4e4a97 | 81 | |
10d788c3 | 82 | public static class Intake { |
8e04baaf | 83 | public static final int INTAKE_ROLLER_PORT = 8; |
44c26e0c | 84 | |
f761d7ba SG |
85 | } |
86 | ||
d17d868d | 87 | public static enum Direction { |
88 | LEFT, RIGHT, DOWN, UP, FORWARD, BACKWARD; | |
89 | } | |
38a404b3 | 90 | } |