-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRobotMap.java
80 lines (66 loc) · 3.09 KB
/
RobotMap.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc.robot;
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into
* to a variable name. This provides flexibility changing wiring, makes checking
* the wiring easier and significantly reduces the number of magic numbers
* floating around.
*/
public class RobotMap {
// ------------------- PWM Ports ---------------------------
// Drive train
public static int frontRightMotor = 0;
public static int rearRightMotor = 1;
public static int frontLeftMotor = 2;
public static int rearLeftMotor = 3;
// Elevator
public static int ElevatorPWM = 8;
// ------------------- DIO Ports ---------------------------
// Elevator
public static int ElevatorEncoderA = 8;
public static int ElevatorEncoderB = 9;
// ------------------- PCM Ports ---------------------------
// Hatch Piston
public static int HatchSolenoid = 0;
// Cargo Piston
public static int CargoSolenoid = 5;
// ------------------- Auto Times --------------------------
// Hatch Piston Time
public static int HatchOutakeTime = 3; // 3 seconds
// Cargo Piston Time
public static int CargoOutakeTime = 3; // 3 seconds
// Controller
public static int controllerPort = 0; // Controller port
// Sticks
public static int sRightX_Port = 4; // Right stick x
public static int sRightY_Port = 5; // Right stick y
public static int sLeftX_Port = 0; // Left stick x
public static int sLeftY_Port = 1; // Left stick y
// Triggers
public static int TriggerRight_Port = 3; // Right trigger
public static int TriggerLeft_Port = 2; // Left trigger
// Bumpers
public static int BumperRight_Port = 6; // Right bumper
public static int BumperLeft_Port = 5; // Left bumper
// Buttons
public static int button_A_Port = 1; // A Button
public static int button_B_Port = 2; // B Button
public static int button_X_Port = 3; // X Button
public static int button_Y_Port = 4; // Y Button
// Special buttons
public static int button_menu_Port = 8; // Menu Button
public static int button_Start_Port = 7; // Start button
// ---------------- Camera Defaults -----------------------
public static int c_WIDTH = 120;
public static int c_HEIGHT = 60;
public static int c_FPS = 18;
// ---------------- Elevator Defaults -----------------------
public static double e_SPEEDUP = 1; // The motor speed when the elevator is traveling up
public static double e_SPEEDDOWN = -.7; // The motor speed when elevator is traveling down
public static double[] e_LEVELS = { .1, .95, 1.45 }; // Rocket heights in meters
}