Skip to content

Added manual control of the turret#148

Open
JAMthepersonj wants to merge 9 commits into
mainfrom
JW-added-manual-turret-control
Open

Added manual control of the turret#148
JAMthepersonj wants to merge 9 commits into
mainfrom
JW-added-manual-turret-control

Conversation

@JAMthepersonj
Copy link
Copy Markdown
Contributor

No description provided.

private final CommandXboxController controller;


public ManualTurretMove(TurretSubsystem subsystem, CommandXboxController controller) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a supplier instead of passing the controller, similar to what we're doing with the drive joysticks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


@Override
public void execute() {
subsystem.manualMove(controller.getLeftX()/4);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this scaling factor into a constant

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
}
public void manualMove(double input){
if((input > 0 && !isAtForwardLimit())||(input < 0 && !isAtReverseLimit())){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to add a max value for turret and a min value and check input against it, just in case a limit switch is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants