Skip to content
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

Joystick control #5

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Joystick control #5

wants to merge 39 commits into from

Conversation

Tricks1228
Copy link
Contributor

@Tricks1228 Tricks1228 commented Sep 10, 2024

Also updates YAGSL

@WispySparks
Copy link
Member

I cleaned up the commit history

Copy link
Member

@WispySparks WispySparks left a comment

Choose a reason for hiding this comment

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

Mostly cleaning up testing code, one method needed docs

Comment on lines +38 to +39
var slider = Shuffleboard.getTab("testing").add("Left/Right", 0).withWidget(BuiltInWidgets.kNumberSlider).getEntry();
var sliderTwo = Shuffleboard.getTab("testing").add("Forward/Backward", 0).withWidget(BuiltInWidgets.kNumberSlider).getEntry();
Copy link
Member

Choose a reason for hiding this comment

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

Remove

Comment on lines +47 to +48
// System.out.println("Angle conversion factor: " + angleConversionFactor);
// if (1 == 1)throw new RuntimeException("");
Copy link
Member

Choose a reason for hiding this comment

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

ditto

src/main/java/frc/robot/subsystems/Swerve.java Outdated Show resolved Hide resolved
Comment on lines +69 to +80
for (var mod : swerveDrive.getModules()) {
var motor = (WPI_TalonSRX) mod.getAngleMotor().getMotor();
if (motor.getDeviceID() == 4) {
// motor.set(0.05);

// System.out.println(motor.getSelectedSensorPosition());
// System.out.println("Motor: " + motor.getDeviceID() + " | Closed loop error: " + motor.getClosedLoopError() + " | Closed loop target: " + motor.getClosedLoopTarget() + " | Current Position: " + motor.getSelectedSensorPosition());
SmartDashboard.putNumber("Error", motor.getClosedLoopError());
SmartDashboard.putNumber("Current", motor.getSelectedSensorPosition());
SmartDashboard.putNumber("Reference", motor.getClosedLoopTarget());
}
}
Copy link
Member

Choose a reason for hiding this comment

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

ditto

return getPose().getRotation();
}

//! TODO: Fill out this info
Copy link
Member

Choose a reason for hiding this comment

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

Document this method

src/main/java/swervelib/motors/TalonSRXSwerve.java Outdated Show resolved Hide resolved
src/main/java/swervelib/motors/TalonSRXSwerve.java Outdated Show resolved Hide resolved
src/main/java/swervelib/motors/TalonSRXSwerve.java Outdated Show resolved Hide resolved
src/main/java/swervelib/motors/TalonSRXSwerve.java Outdated Show resolved Hide resolved
src/main/java/swervelib/motors/TalonSRXSwerve.java Outdated Show resolved Hide resolved
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