Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Drive wheel testing function #73

Merged
merged 9 commits into from
Oct 27, 2023
Merged

Drive wheel testing function #73

merged 9 commits into from
Oct 27, 2023

Conversation

Hsaunders603
Copy link
Contributor

@Hsaunders603 Hsaunders603 commented Oct 26, 2023

Drive test program -- mapped to buttons to spin wheels forward, backward, right, and left for 5 seconds. Intended to be a simple way to test wheels easily in the pits. Branch [arm-updates] was already merged in for simplifying testing.

@Hsaunders603 Hsaunders603 requested a review from a team as a code owner October 26, 2023 23:07
@Hsaunders603 Hsaunders603 requested review from bot190 and msoucy October 26, 2023 23:07
@Hsaunders603 Hsaunders603 changed the title Complete code for drive wheel testing Drive wheel testing function Oct 26, 2023
@msoucy msoucy merged commit 3066c6d into main Oct 27, 2023
@msoucy msoucy deleted the wheel-testing-h branch October 27, 2023 15:37
Comment on lines +233 to +241
/*
* public CommandBase testDriveDriver() {
* return sequence(
* moveForDirectional(0, 1, 5),
* moveForDirectional(1, 0, 5),
* moveForDirectional(0, -1, 5),
* moveForDirectional(-1, 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.

We generally don't want to keep commented code

Comment on lines +229 to +232
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));
Copy link
Member

Choose a reason for hiding this comment

The 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.
And if this happens during a match at the very least it'll cause lost time.

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).
Or at the very least make these whileTrue instead of onTrue.

Copy link
Member

Choose a reason for hiding this comment

The 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?
We should also make sure we put the units of values in argument names.

Comment on lines +131 to +137
public CommandBase testDriveDriver() {
return sequence(
drive.moveForDirectional(0, 1, 5),
drive.moveForDirectional(1, 0, 5),
drive.moveForDirectional(0, -1, 5),
drive.moveForDirectional(-1, 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.

Doesn't look like this is used anywhere either, can we remove it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants