This repository was archived by the owner on Jan 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed
src/main/java/frc/robot/util/scheduling Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change 1
1
package frc .robot .util .scheduling ;
2
2
3
3
public enum SubsystemPriority {
4
- // Vision must run before **everything** to ensure that the cached data is fresh
5
- VISION (50 ),
4
+ // 20-29 is for sensor subsystems
6
5
7
- NOTE_TRACKING (41 ),
8
- AUTOS (40 ),
6
+ // IMU runs before vision so that it has fresh data to pass to MegaTag2
7
+ IMU (22 ),
8
+ // Vision runs before localization so that it has fresh vision data for pose estimator
9
+ VISION (21 ),
10
+ // Localization runs before arm and shooter so that they have fresh speaker distance values
11
+ LOCALIZATION (20 ),
12
+ FMS (20 ),
9
13
10
- ROBOT_MANAGER ( 30 ),
14
+ // 10-19 is for actuator subsystems
11
15
12
- SNAPS (20 ),
13
-
14
- SWERVE (10 ),
15
- IMU (10 ),
16
+ ARM (10 ),
16
17
SHOOTER (10 ),
17
- LOCALIZATION (10 ),
18
- INTAKE (10 ),
19
18
QUEUER (10 ),
20
- ARM (10 ),
19
+ INTAKE (10 ),
20
+
21
+ // 0-9 is for manager subsystems
21
22
22
- FMS (0 ),
23
- RUMBLE_CONTROLLER (0 );
23
+ // Robot manager runs last so that all sensor data is fresh before processing state transitions
24
+ ROBOT_MANAGER (0 ),
25
+ AUTOS (0 );
24
26
25
27
final int value ;
26
28
You can’t perform that action at this time.
0 commit comments