-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mode manager for easy toggle between competition and demo #58
Conversation
@@ -208,7 +209,7 @@ public static final class ElevatorConstants { | |||
public static final double MAX_HEIGHT_METERS = Units.inchesToMeters(17); | |||
public static final double STARTING_HEIGHT_METERS = Units.inchesToMeters(2); | |||
public static final boolean SIMULATE_GRAVITY = true; | |||
public static final int ELEVATOR_CURRENT_LIMIT = 30; | |||
public static final int ELEVATOR_CURRENT_LIMIT = Robot.modeManager.getMode() == RobotMode.DEMO ? 15 : 30; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something we were playing with to apply demo mode to the elevator acceleration but haven't tested yet. We're also not sure this is the best place to apply this logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
0df37ea
to
84eab78
Compare
tested on hardware 10/30 |
Adds a Robot mode manager to easily switch between demo and competition mode.
That mode should be accessible throughout the Robot code to define speeds, acceleration and other factors to make it safer to operate during demos.
This also makes the Robot mode setter accessible from the Elastic dashboard.
We've tested this code on the robot last Tuesday.