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

Switch to Spark Max + Encoders + Built in PID for auto #2

Merged
merged 31 commits into from
Feb 6, 2024

Conversation

jack60612
Copy link

No description provided.

@jack60612 jack60612 marked this pull request as ready for review January 23, 2024 22:18
@@ -0,0 +1,6 @@
{
"download": {
"localDir": "C:\\Users\\BeachBots\\Downloads",

Choose a reason for hiding this comment

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

What is this for? Can we avoid hard paths?

Copy link
Author

Choose a reason for hiding this comment

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

this i can just git ignore, it was autogenerated.

Copy link
Author

Choose a reason for hiding this comment

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

but its good to keap because team id so i think we could remove if needed

src/main/java/frc/robot/DriveConstants.java Show resolved Hide resolved
src/main/java/frc/robot/HelperFunctions.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/commands/ArmCommand.java Outdated Show resolved Hide resolved
if (!m_distanceController.atGoal() || !m_turnController.atGoal()) {
this.tankDrive(leftStickValue, rightStickValue);
public void driveToRelativePosition(double targetPosition) {
if (targetPosition < 0.1) { // less then 0.1 meters, do nothing, pervents feedback loop

Choose a reason for hiding this comment

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

shouldn't this be targetPosition > 0.1?

Also what is the harm? Since all we're doing here is passing it off to driveToPosition shouldn't all the accuracy checks be done there?

Copy link
Author

Choose a reason for hiding this comment

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

this is like a safer interface i guess

double rightStickValue = distanceThrottleRate - turnRotateToAngleRate;
if (!m_distanceController.atGoal() || !m_turnController.atGoal()) {
this.tankDrive(leftStickValue, rightStickValue);
public void driveToRelativePosition(double targetPosition) {

Choose a reason for hiding this comment

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

Where is this method being called?

Copy link
Author

Choose a reason for hiding this comment

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

i removed the drive and turn, but this is in case we need to add it back or do something similar as it allows us to easily interface with the position based pid on the neo motors.

src/main/java/frc/robot/subsystems/DriveSubsystem.java Outdated Show resolved Hide resolved
@jack60612 jack60612 requested a review from sviridovt January 24, 2024 16:37
@jack60612 jack60612 merged commit 98b0111 into main Feb 6, 2024
6 of 8 checks passed
@jack60612 jack60612 deleted the jn.switch-neos branch February 6, 2024 14:57
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.

3 participants