More logging#48
Conversation
JRTaylord
left a comment
There was a problem hiding this comment.
Let's be careful with accessing the pigeon at the moment because that looks like the source of our previous seg fault issues.
Also for the zeroed methods, let's have them log if the zero button has been pressed at any point previously just as a quick way to check if the buttons have been pressed at any point
| } | ||
|
|
||
| public boolean armZeroed() { | ||
| if (armMotor.getPosition().getValueAsDouble() == 0.0) { |
There was a problem hiding this comment.
Let's have this track if the zero button has been pressed or if the zeroing command has ran
| public IntakeIOSparkFlex(){ | ||
| sparkFlex.restoreFactoryDefaults(); | ||
| sparkFlex.setInverted(false); | ||
| sparkFlex.setInverted(Constants.isCompBot() ? false : true); |
There was a problem hiding this comment.
I don't think we need this anymore because the practice bot is working
| } | ||
|
|
||
| public boolean zeroed() { | ||
| if (talonFX.getPosition().getValueAsDouble() == 0.0) { |
There was a problem hiding this comment.
Same here, just have it return if the zero button has been pressed at any time previously.
| inputs.tyBase = getTYBase(); | ||
| inputs.tyAdjusted = getTYAdjusted(); | ||
| inputs.pipeline = getPipeline(); | ||
| inputs.botpose = getBotPose(); |
There was a problem hiding this comment.
My only concern here is what it does when the bot pose is null. I don't want to tank our code when the limelight isn't seeing a target
| // Logger.recordOutput("Rotation2d", this.getPigeon2().getRotation2d()); | ||
| Logger.recordOutput("Swerve: CurrentState", this.getState().ModuleStates); | ||
| Logger.recordOutput("Swerve: TargetState", this.getState().ModuleTargets); | ||
| Logger.recordOutput("Pigeon Yaw: ", this.getPigeon2().getYaw().getValueAsDouble()); |
There was a problem hiding this comment.
This nee ds to be tested because this could be the source of our previous seg faults which would kill us on the comp field
I can't find the method for getting the setpoint of motors that aren't talonFX.