-
Notifications
You must be signed in to change notification settings - Fork 0
Climb improvements #222
base: master
Are you sure you want to change the base?
Climb improvements #222
Conversation
@Override | ||
public void execute() { | ||
setpoint = -joystickInput.get() * Constants.Climber.MODIFY_JOYSTICK_RATE; | ||
if (Math.abs((climber.getLeftHeight() + climber.getRightHeight()) / 2 - setpoint) < Constants.Climber.ALLOWED_HEIGHT_TOLERANCE) { |
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 line is to long. Expand its components into a (few) variable(s).
* This command would allow the driver to modify the robot's angle manually | ||
* with the value of the left xbox's joystick. | ||
*/ | ||
public class JoystickRelease extends CommandBase { |
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.
Does this command release the joysticks?
@@ -35,6 +36,7 @@ | |||
private final UnitModel unitModel = new UnitModel(Constants.Climber.TICKS_PER_METER); | |||
private DoubleSolenoid stopperA = null; | |||
private Solenoid stopperB = null; | |||
private boolean addDefault = false; |
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 flag's name is not clear enough.
But, why do you need it?
} | ||
|
||
if (addDefault) { | ||
this.setDefaultCommand(new JoystickRelease(this)); |
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.
Subsystem shouldn't know about their default commands.
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.
There is a serious lack of documentation which makes it hard to see what changes the code brings. I'd suggest you add some lines so it would be easier to review
This PR adds a command that would allow the driver to manually adjust the height of which the system releases the rods. It would set this command as a default command at the beginning of the Endgame.