-
Notifications
You must be signed in to change notification settings - Fork 0
Drive wheel testing function #73
Changes from all commits
976b77f
27fdf68
a80431e
aac50dd
f5a925e
67946ca
ecc57a1
6283926
1fc1dd2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,11 +154,12 @@ public CommandBase rumbleAndIntakeSpinningOff() { | |
public CommandBase pickUpGamePiece = sequence( | ||
new ConditionalCommand( | ||
sequence( | ||
armRotate.moveTo(ArmPresets.CONE_PICKUP), armExtend.moveTo(ArmPresets.CONE_PICKUP)), | ||
armRotate.moveTo(ArmPresets.CONE_PICKUP), armExtend.moveTo(ArmPresets.CONE_PICKUP), | ||
intake.toggle()), | ||
sequence( | ||
armRotate.moveTo(ArmPresets.CUBE_PICKUP), armExtend.moveTo( | ||
ArmPresets.CUBE_PICKUP), | ||
intake.coneRelease()), | ||
intake.coneRelease(), intake.toggle()), | ||
() -> { | ||
return gamePieceSub.get() == "Cone"; | ||
})); | ||
|
@@ -225,8 +226,19 @@ public void configureButtonBindings() { | |
driveController.x().whileTrue(drive.rotateToAngle(Rotation2d.fromDegrees(180), () -> 0, () -> 0)); | ||
driveController.a().whileTrue(drive.rotateToAngle(Rotation2d.fromDegrees(0), () -> 0, () -> 0)); | ||
|
||
(new Trigger(() -> driveController.getRightTriggerAxis() > 0.5)) | ||
.onTrue(balanceArm.pushDown()).onFalse(balanceArm.pushUp()); | ||
driveController.povDown().onTrue(drive.moveForDirectional(0, 1, 5)); | ||
driveController.povRight().onTrue(drive.moveForDirectional(1, 0, 5)); | ||
driveController.povUp().onTrue(drive.moveForDirectional(0, -1, 5)); | ||
driveController.povLeft().onTrue(drive.moveForDirectional(-1, 0, 5)); | ||
Comment on lines
+229
to
+232
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit nervous about having these mappings on the drive controller. It's pretty dangerous to have a command that can cause the robot to take off in a direction without a way to easily stop it. I think these would be best on the dashboard (https://docs.wpilib.org/en/stable/docs/software/dashboards/shuffleboard/advanced-usage/shuffleboard-commands-subsystems.html#displaying-commands). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can probably slow this down a bit too, not sure it needs to be at 1m/s, maybe 0.5? |
||
/* | ||
* public CommandBase testDriveDriver() { | ||
* return sequence( | ||
* moveForDirectional(0, 1, 5), | ||
* moveForDirectional(1, 0, 5), | ||
* moveForDirectional(0, -1, 5), | ||
* moveForDirectional(-1, 0, 5)); | ||
* } | ||
*/ | ||
Comment on lines
+233
to
+241
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We generally don't want to keep commented code |
||
// Arm | ||
|
||
// COPILOT CONTROLLER | ||
|
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.
Doesn't look like this is used anywhere either, can we remove it?