Skip to content

More logging#48

Open
annashimshock wants to merge 13 commits into
mainfrom
MoreLogging
Open

More logging#48
annashimshock wants to merge 13 commits into
mainfrom
MoreLogging

Conversation

@annashimshock

Copy link
Copy Markdown
Contributor

I can't find the method for getting the setpoint of motors that aren't talonFX.

@JRTaylord JRTaylord left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we need this anymore because the practice bot is working

}

public boolean zeroed() {
if (talonFX.getPosition().getValueAsDouble() == 0.0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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