-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Made Telemetry Preferences for motors #145
Conversation
Made Telemetry Preferences for motors
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.
I am going insane. Is this a test? Is this a dream? Does our robot need to know where it isn't?
@@ -31,6 +32,7 @@ public void configMotors() { | |||
elevator.setPeriodicFramePeriod(PeriodicFrame.kStatus5, 65535); | |||
elevator.getEncoder().setPositionConversionFactor(TrapConstants.ELEVATOR_POSITION_CONVERSION_FACTOR); | |||
elevator.setPID(TrapConstants.TRAP_PID); | |||
elevator.setTelemetryPreference(TelemetryPreference.NO_ENCODER); |
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.
THe elevator most definitely has an encoder
@@ -33,6 +33,7 @@ public void configMotor() { | |||
ShooterConstants.PIVOT_D, | |||
ShooterConstants.PIVOT_MIN_OUTPUT, | |||
ShooterConstants.PIVOT_MAX_OUTPUT); | |||
pivot.setTelemetryPreference(TelemetryPreference.NO_ENCODER); |
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.
The pivot has an absolute encoder on it, not no encoder. WHY DOES NOTHING HAVE ENCODERS ANYMORE
@@ -30,6 +31,8 @@ public void configMotors() { | |||
ShooterConstants.SHOOTER_D, | |||
ShooterConstants.SHOOTER_MIN_OUTPUT, | |||
ShooterConstants.SHOOTER_MAX_OUTPUT); | |||
motorLeft.setTelemetryPreference(TelemetryPreference.NO_ENCODER); | |||
motorRight.setTelemetryPreference(TelemetryPreference.NO_ENCODER); |
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.
THE SHOTOER HAS AN ECNODER WE NEED TO TALK TO IT TO TELL IT MOVE FAST!
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.
I am going to assume you forgot to push your changes, this is the same PR as the one I reviewed previously.
public void configMotors() { | ||
rearRight.setTelemetryPreference(TelemetryPreference.NO_ENCODER); | ||
rearLeft.setTelemetryPreference(TelemetryPreference.NO_ENCODER); | ||
frontLeft.setTelemetryPreference(TelemetryPreference.NO_ENCODER); | ||
frontRight.setTelemetryPreference(TelemetryPreference.NO_ENCODER); | ||
} |
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.
This shouldn't be here. Configure the motors inside of MAXSwerveModule, not here. Also, we don't want swerve modules to be set to NO_ENCODER
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.
A couple of telemetry preferences are absolute when they should be relative. Also, I am not seeing anything for the pivot, is this intentional?
elevator.getEncoder().setPositionConversionFactor(TrapConstants.ELEVATOR_POSITION_CONVERSION_FACTOR); | ||
elevator.setPID(TrapConstants.TRAP_PID); | ||
elevator.setTelemetryPreference(TelemetryPreference.ONLY_ABSOLUTE_ENCODER); |
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.
only relative
motorLeft.setTelemetryPreference(TelemetryPreference.ONLY_ABSOLUTE_ENCODER); | ||
motorRight.setTelemetryPreference(TelemetryPreference.ONLY_ABSOLUTE_ENCODER); |
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.
both only relative
@@ -38,6 +38,7 @@ | |||
import frc.robot.util.Constants.FieldConstants; | |||
import monologue.Logged; | |||
import monologue.Annotations.Log; | |||
import frc.robot.util.Neo.TelemetryPreference; |
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.
unused import is that you
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.
(IDC if you resolve this)
I imported Telemetry Preferences so the subsystems, then added Telemetry Preferences for the motors in each subsystem that contains a motor. All that needs to be done is testing it in the sim (I can't run sim on the school computer.)