-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathSchematic.java
More file actions
202 lines (158 loc) · 5.31 KB
/
Schematic.java
File metadata and controls
202 lines (158 loc) · 5.31 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
package frc.robot;
public class Schematic {
// Drive (CAN IDs)
public static final int pigeonCanId;
public static final int frontLeftDriveCanId;
public static final int backLeftDriveCanId;
public static final int frontRightDriveCanId;
public static final int backRightDriveCanId;
public static final int frontLeftTurnCanId;
public static final int backLeftTurnCanId;
public static final int frontRightTurnCanId;
public static final int backRightTurnCanId;
public static final int frontLeftAbsoluteEncoderCanId;
public static final int backLeftAbsoluteEncoderCanId;
public static final int frontRightAbsoluteEncoderCanId;
public static final int backRightAbsoluteEncoderCanId;
// shooter subsystem
public static final int shooterTopLeftMotorCanId;
public static final int shooterTopRightMotorCanId;
public static final int shooterBottomLeftMotorCanId;
public static final int shooterBottomRightMotorCanId;
// magic carpet sub-system
public static final int magicCarpetCanId;
// indexer subsystem
public static final int indexerFeedupCanId;
// intake subsystem
public static final int intakeMotorCanId;
public static final int intakeExtendCanId;
// climber subsystem
public static final int climberMotorCanId;
static {
switch (Constants.getRobot()) {
case ROBOT_2025_COMP -> {
// Device CAN IDs
// TODO: Change for 2025 as needed
// Drive (CAN IDs)
pigeonCanId = 17;
frontLeftDriveCanId = 3;
frontLeftTurnCanId = 4;
frontRightDriveCanId = 7;
frontRightTurnCanId = 8;
backRightDriveCanId = 1;
backRightTurnCanId = 2;
backLeftDriveCanId = 5;
backLeftTurnCanId = 6;
frontLeftAbsoluteEncoderCanId = 19;
frontRightAbsoluteEncoderCanId = 21;
backRightAbsoluteEncoderCanId = 18;
backLeftAbsoluteEncoderCanId = 20;
// Shooter (CAN Ids)
shooterTopLeftMotorCanId = 0;
shooterTopRightMotorCanId = 0;
shooterBottomLeftMotorCanId = 0;
shooterBottomRightMotorCanId = 0;
// Magic Carpet (CAN Ids)
magicCarpetCanId = 0;
// Indexer (CAN IDs and DIOs)
indexerFeedupCanId = 0;
// Intake (CAN IDs)
intakeMotorCanId = 0;
intakeExtendCanId = 0;
// Climber (CAN IDs)
climberMotorCanId = 0;
}
case ROBOT_2026_COMP -> {
// Device CAN Id
pigeonCanId = 17;
// Drive (CAN Ids)
frontLeftDriveCanId = 1;
frontLeftTurnCanId = 2;
frontRightDriveCanId = 3;
frontRightTurnCanId = 4;
backRightDriveCanId = 5;
backRightTurnCanId = 6;
backLeftDriveCanId = 7;
backLeftTurnCanId = 8;
frontLeftAbsoluteEncoderCanId = 18;
frontRightAbsoluteEncoderCanId = 19;
backRightAbsoluteEncoderCanId = 20;
backLeftAbsoluteEncoderCanId = 21;
// Shooter (CAN Ids)
shooterTopLeftMotorCanId = 11;
shooterTopRightMotorCanId = 12;
shooterBottomLeftMotorCanId = 13;
shooterBottomRightMotorCanId = 14;
// Hopper (CAN Ids)
magicCarpetCanId = 15;
// Indexer (CAN Ids)
indexerFeedupCanId = 9;
// Intake (CAN IDs)
intakeMotorCanId = 23;
intakeExtendCanId = 14;
// Climber (CAN Ids)
climberMotorCanId = 22;
}
case ROBOT_BRIEFCASE -> {
// Drive (CAN IDs)
pigeonCanId = 0;
frontLeftDriveCanId = 0;
backLeftDriveCanId = 0;
frontRightDriveCanId = 0;
backRightDriveCanId = 0;
frontLeftTurnCanId = 0;
backLeftTurnCanId = 0;
frontRightTurnCanId = 0;
backRightTurnCanId = 0;
frontLeftAbsoluteEncoderCanId = 0;
backLeftAbsoluteEncoderCanId = 0;
frontRightAbsoluteEncoderCanId = 0;
backRightAbsoluteEncoderCanId = 0;
// Shooter (CAN Ids)
shooterTopLeftMotorCanId = 0;
shooterTopRightMotorCanId = 0;
shooterBottomLeftMotorCanId = 0;
shooterBottomRightMotorCanId = 0;
// Magic Carpet (CAN Ids)
magicCarpetCanId = 0;
// Indexer (CAN IDs and DIOs)
indexerFeedupCanId = 0;
// Intake (CAN IDs)
intakeMotorCanId = 0;
intakeExtendCanId = 0;
// Climber (CAN IDs)
climberMotorCanId = 0;
}
default -> {
// Drive (CAN IDs)
pigeonCanId = 0;
frontLeftDriveCanId = 0;
backLeftDriveCanId = 0;
frontRightDriveCanId = 0;
backRightDriveCanId = 0;
frontLeftTurnCanId = 0;
backLeftTurnCanId = 0;
frontRightTurnCanId = 0;
backRightTurnCanId = 0;
frontLeftAbsoluteEncoderCanId = 0;
backLeftAbsoluteEncoderCanId = 0;
frontRightAbsoluteEncoderCanId = 0;
backRightAbsoluteEncoderCanId = 0;
// Shooter (CAN Ids)
shooterTopLeftMotorCanId = 0;
shooterTopRightMotorCanId = 0;
shooterBottomLeftMotorCanId = 0;
shooterBottomRightMotorCanId = 0;
// Magic Carpet (CAN Ids)
magicCarpetCanId = 0;
// Indexer (CAN IDs and DIOs)
indexerFeedupCanId = 0;
// Intake (CAN IDs)
intakeMotorCanId = 0;
intakeExtendCanId = 0;
// Climber (CAN IDs)
climberMotorCanId = 0;
}
}
}
}