Skip to content

Initial Ports and Controls #58

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

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open

Conversation

TaeSeanDo
Copy link
Contributor

Not to be merged until tested.

@TaeSeanDo TaeSeanDo self-assigned this Feb 29, 2020
Copy link
Member

@docprofsky docprofsky left a comment

Choose a reason for hiding this comment

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

One changes has been ordered.

@@ -22,7 +22,11 @@ public Climb(SpeedController winchMotor, SpeedController armMotor, int armLockPi
}

public void runWinch(double power) {
winchMotor.set(power);
if (!armLockPiston.get()) {
Copy link
Member

Choose a reason for hiding this comment

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

Make a method boolean getWinchLocked() and use that here.

@@ -76,7 +76,7 @@ public void update() {
* @param power positive is counter clockwise
*/
public void moveRotator(double power) {
rotatorMotor.set(power);
rotatorMotor.set(0.1 * power);
Copy link
Member

Choose a reason for hiding this comment

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

For best limiting of the power, we should put limit the input values to [-1, 1]. Otherwise, an enterprising individual could moveRotator(10);.

Comment on lines 146 to 150
// ballChucker9000.moveRotator(ballChucker9000.getRotatorEncoder() >= 270 ? 0 : 0.5);
ballChucker9000.moveRotator(0.5);
} else if (manipulator.getButton(Button.LEFT_BUMPER)) {
ballChucker9000.moveRotator(ballChucker9000.getRotatorEncoder() <= 0 ? 0 : -0.1);
// ballChucker9000.moveRotator(ballChucker9000.getRotatorEncoder() <= 0 ? 0 : -0.5);
ballChucker9000.moveRotator(-0.5);
Copy link
Member

Choose a reason for hiding this comment

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

I do not love commented code. It can stay iff there is a good reason to keep it as a comment and a comment for why we are keeping the code is added.

} else {
climb.runWinch(0);
climb.runWinch(-0.5 * manipulator.getAxis(Axis.LEFT_TRIGGER));
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to run the winch in reverse?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case there's not enough slack. Mostly for testing

Comment on lines 183 to 188
ButtonToggleRunner testWinchLockToggleRunner;

@Override
public void testInit() {
testWinchLockToggleRunner = new ButtonToggleRunner(() -> rightJoystick.getTrigger(), climb::toggleLock);
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this code?

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