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 { | |
200caf63 KZ |
13 | public static class OI { |
14 | // Computer Ports | |
15 | public final static int LEFT_STICK_PORT = 0; | |
16 | public final static int RIGHT_STICK_PORT = 1; | |
17 | // Ports on the Joystick | |
18 | public final static int TRIGGER_PORT = 1; | |
19 | public final static int DECREMENT_SHOOTER_SPEED_PORT = 2; | |
20 | public final static int INCREMENT_SHOOTER_SPEED_PORT = 3; | |
21 | public final static int SHOOT_PORT = 4; | |
22 | public final static int LOG_PORT = 5; | |
23 | } | |
38a404b3 | 24 | |
200caf63 KZ |
25 | public static class DriveTrain { |
26 | // Drivetrain Motor Related Ports | |
33141cdd KZ |
27 | public static final int FRONT_LEFT = 1; |
28 | public static final int FRONT_RIGHT = 4; | |
29 | public static final int REAR_LEFT = 2; | |
30 | public static final int REAR_RIGHT = 3; | |
27615e61 | 31 | |
200caf63 | 32 | // Encoder related ports |
33141cdd KZ |
33 | public final static int ENCODER_LEFT_A = 0; |
34 | public final static int ENCODER_LEFT_B = 1; | |
35 | public final static int ENCODER_RIGHT_A = 9; | |
36 | public final static int ENCODER_RIGHT_B = 8; | |
45bdf5b9 | 37 | |
8058ae1c SC |
38 | public final static int FORWARD_CHANNEL = 0; |
39 | public final static int REVERSE_CHANNEL = 0; | |
40 | ||
200caf63 KZ |
41 | private final static double WHEEL_DIAMETER = 6.0; // in inches |
42 | private final static double PULSES_PER_ROTATION = 256; // in pulses | |
43 | private final static double OUTPUT_SPROCKET_DIAMETER = 2.0; // in inches | |
44 | private final static double WHEEL_SPROCKET_DIAMETER = 3.5; // in inches | |
33141cdd KZ |
45 | public static final double INCHES_PER_PULSE = |
46 | ((3.66 / 5.14) * 6 * Math.PI) / 256; | |
47 | ||
48 | public static final int MANUAL_MODE = 1, ENCODER_MODE = 2, GYRO_MODE = 3; | |
d9c04720 SC |
49 | public static final int LEFT_FORWARD = 0, LEFT_REVERSE = 1, |
50 | RIGHT_FORWARD = 2, RIGHT_REVERSE = 3; | |
33141cdd | 51 | public static double time = 0; |
2a099bc6 KZ |
52 | |
53 | // Gearing constants | |
54 | public static final Value HIGH_GEAR = DoubleSolenoid.Value.kForward; | |
55 | public static final Value LOW_GEAR = DoubleSolenoid.Value.kReverse; | |
56 | ||
200caf63 | 57 | } |
ecf2c4a8 | 58 | |
200caf63 KZ |
59 | public static class Scaler { |
60 | // Piston channels | |
61 | public final static int FORWARD_CHANNEL = 0; | |
62 | public final static int REVERSE_CHANNEL = 0; | |
ecf2c4a8 | 63 | |
200caf63 KZ |
64 | // Winch port |
65 | public final static int WINCH_MOTOR = 0; | |
8b905afe | 66 | |
200caf63 | 67 | } |
38a404b3 | 68 | |
200caf63 KZ |
69 | public static class Shooter { |
70 | public static final int PORT = 0; | |
71 | public static final int PUNCH_FORWARD_PORT = 0; | |
72 | public static final int PUNCH_REVERSE_PORT = 1; | |
73 | public static final int ANGLE_ADJUSTER_PORT = 0; | |
2c52cb6e | 74 | |
200caf63 KZ |
75 | public static final DoubleSolenoid.Value punch = DoubleSolenoid.Value.kForward; |
76 | public static final DoubleSolenoid.Value retract = DoubleSolenoid.Value.kReverse; | |
da0c4bd8 | 77 | |
200caf63 KZ |
78 | // Encoder port |
79 | public static final int ENCODER_PORT_A = 0; | |
80 | public static final int ENCODER_PORT_B = 0; | |
2c52cb6e | 81 | |
200caf63 KZ |
82 | public static enum State { |
83 | RUNNING, STOPPED; | |
84 | } | |
85 | } | |
40348cab | 86 | |
200caf63 KZ |
87 | public static class IntakeArm { |
88 | public static final int ROLLER_PORT = 0; | |
89 | public static final int ARM_PORT = 1; | |
90 | public static final int POT_CHANNEL = 0; | |
91 | public static final double INTAKE_SPEED = 0.5; | |
92 | public static final double OUTPUT_SPEED = -0.5; | |
93 | public final static double FULL_RANGE = 270.0; // in degrees | |
94 | public final static double OFFSET = -135.0; // in degrees | |
95 | public static final double ZERO_ANGLE = 0; | |
96 | } | |
29f5cd04 | 97 | |
200caf63 KZ |
98 | public static class DefenseArm { |
99 | // Potentiometer related ports | |
100 | public static final int ARM_CHANNEL = 0; | |
101 | public static final int ARM_PORT = 0; | |
102 | public static final int HAND_PORT = 1; | |
103 | public static final int HAND_CHANNEL = 1; | |
104 | public final static double FULL_RANGE = 270.0; // in degrees | |
105 | public final static double OFFSET = -135.0; // in degrees | |
106 | public final static double[] armPotValue = { 0.0, 45.0, 90.0 }; // 3 | |
107 | // level | |
108 | public final static double ARM_LENGTH = 0; // TODO: find actual length | |
109 | public final static double HAND_LENGTH = 0; // TODO: find actual length | |
110 | public final static double ARM_MOUNTED_HEIGHT = 0; // TODO: find actual | |
111 | // height | |
112 | } | |
1826a8dc | 113 | |
200caf63 KZ |
114 | public enum Defense { |
115 | PORTCULLIS, SALLY_PORT, ROUGH_TERRAIN, LOW_BAR, CHEVAL_DE_FRISE, DRAWBRIDGE, MOAT, ROCK_WALL, RAMPART; | |
116 | } | |
38a404b3 | 117 | } |