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