1 package org
.usfirst
.frc
.team3501
.robot
;
3 import edu
.wpi
.first
.wpilibj
.DoubleSolenoid
;
4 import edu
.wpi
.first
.wpilibj
.DoubleSolenoid
.Value
;
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.
12 public class Constants
{
13 public final static int PCM_MODULE_A
= 9;
14 public final static int PCM_MODULE_B
= 10;
16 public static class OI
{
18 public final static int LEFT_STICK_PORT
= 0;
19 public final static int RIGHT_STICK_PORT
= 1;
21 public final static int LEFT_JOYSTICK_TRIGGER_PORT
= 1;
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;
29 public static class DriveTrain
{
30 // Drivetrain Motor Related Ports
31 public static final int FRONT_LEFT
= 1;
32 public static final int FRONT_RIGHT
= 6;
33 public static final int REAR_LEFT
= 2;
34 public static final int REAR_RIGHT
= 5;
36 // Encoder related ports
37 public final static int ENCODER_LEFT_A
= 0;
38 public final static int ENCODER_LEFT_B
= 1;
39 public final static int ENCODER_RIGHT_A
= 3;
40 public final static int ENCODER_RIGHT_B
= 4;
42 public static final int LEFT_MODULE
= PCM_MODULE_B
;
43 public static final int LEFT_FORWARD
= 6, LEFT_REVERSE
= 5;
44 public static final int RIGHT_MODULE
= PCM_MODULE_B
;
45 public static final int RIGHT_FORWARD
= 0, RIGHT_REVERSE
= 1;
47 public static final double INCHES_PER_PULSE
= ((3.66 / 5.14) * 6 * Math
.PI
) / 256;
49 public static double kp
= 0.013, ki
= 0.000015, kd
= -0.002;
50 public static double encoderTolerance
= 8.0;
53 public static final Value HIGH_GEAR
= DoubleSolenoid
.Value
.kForward
;
54 public static final Value LOW_GEAR
= DoubleSolenoid
.Value
.kReverse
;
56 public static final double PASS_DEFENSE_TIMEOUT
= 10; // find this
59 public static class Scaler
{
61 public final static int FORWARD_CHANNEL
= 6;
62 public final static int REVERSE_CHANNEL
= 0;
65 public final static int WINCH_MOTOR
= 0;
68 public final static double WINCH_STOP_SPEED
= 0.0;
69 public final static double SCALE_SPEED
= 0;
70 public final static double SECONDS_TO_CLAMP
= 2.0;
73 public final static int SECONDS_TO_SCALE
= 0;
75 public static boolean SCALING
= false;
79 public static class Shooter
{
80 public static final int CATAPULT1_MODULE
= PCM_MODULE_B
;
81 public static final int CATAPULT1_FORWARD
= 0;
82 public static final int CATAPULT1_REVERSE
= 6;
83 public static final int CATAPULT2_MODULE
= PCM_MODULE_B
;
84 public static final int CATAPULT2_FORWARD
= 1;
85 public static final int CATAPULT2_REVERSE
= 7;// TODO Determine actual
88 public static final Value shoot
= Value
.kForward
;
89 public static final Value reset
= Value
.kReverse
;
90 public static final double WAIT_TIME
= 2.0; // In seconds
93 public static class IntakeArm
{
94 public static final int ROLLER_PORT
= 3;
97 public static final int LEFT_FORWARD
= 0;
98 public static final int LEFT_REVERSE
= 1;
100 public static final int RIGHT_FORWARD
= 2;
101 public static final int RIGHT_REVERSE
= 3;
103 public static final Value EXTEND
= DoubleSolenoid
.Value
.kForward
;
104 public static final Value RETRACT
= DoubleSolenoid
.Value
.kReverse
;
107 public static final double INTAKE_SPEED
= 0.5;
108 public static final double OUTPUT_SPEED
= -0.5;