Skip to content

Commit 9d2f3bd

Browse files
committed
feat: create arm state enum
Signed-off-by: Dasun Abeykoon <[email protected]>
1 parent 0a3c274 commit 9d2f3bd

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright (c) 2025 FRC 6423 - Ward Melville Iron Patriots
2+
// https://github.com/wmironpatriots
3+
//
4+
// Open Source Software; you can modify and/or share it under the terms of
5+
// MIT license file in the root directory of this project
6+
7+
package org.frc6423.robot.subsystems.arm;
8+
9+
import edu.wpi.first.math.geometry.Rotation2d;
10+
11+
/** Represents a state the {@link Arm} subsystem can be in */
12+
public enum ArmState {
13+
/** Resting state */
14+
STOWED(Rotation2d.fromDegrees(0.0), 0.0),
15+
/** Avoidance state for preventing collisions */
16+
AVOIDING(Rotation2d.fromDegrees(0.0), 0.0),
17+
/** Flipped state for intaking */
18+
INTAKING(Rotation2d.fromDegrees(0.0), 0.0),
19+
/** L2 pose but not scoring */
20+
L2_PRIMED(Rotation2d.fromDegrees(0.0), 0.0),
21+
/** L3 pose but not scoring */
22+
L3_PRIMED(Rotation2d.fromDegrees(0.0), 0.0),
23+
/** L4 pose but not scoring */
24+
L4_PRIMED(Rotation2d.fromDegrees(0.0), 0.0),
25+
/** L2 scoring */
26+
L2_SCORING(Rotation2d.fromDegrees(0.0), 0.0),
27+
/** L3 scoring */
28+
L3_SCORING(Rotation2d.fromDegrees(0.0), 0.0),
29+
/** L4 scoring */
30+
L4_SCORING(Rotation2d.fromDegrees(0.0), 0.0);
31+
32+
public final Rotation2d angle;
33+
public final double rollerSpeedRpm;
34+
35+
private ArmState(Rotation2d angle, double rollerSpeedRpm) {
36+
this.angle = angle;
37+
this.rollerSpeedRpm = rollerSpeedRpm;
38+
}
39+
}

0 commit comments

Comments
 (0)