Skip to content

Make CTRE hardware safer for comp (and easier to debug)#20

Merged
Oliver-Cushman merged 8 commits intomainfrom
safe-talon
Dec 13, 2024
Merged

Make CTRE hardware safer for comp (and easier to debug)#20
Oliver-Cushman merged 8 commits intomainfrom
safe-talon

Conversation

@Oliver-Cushman
Copy link
Member

you get 20 tries or its over

refactor Kraken.java so that it supports interaction with the StatusCode object, which allows us to have lots of debugging power which will be especially useful when we recieve the new drivebase.
add javadoc to all the new ctre files
alexanduzz hamiltuzz will love this
@Oliver-Cushman Oliver-Cushman linked an issue Dec 10, 2024 that may be closed by this pull request
5 tasks
Copy link

@RudyG252 RudyG252 left a comment

Choose a reason for hiding this comment

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

Looks good to me 😼

rollSignal,
rollVelocitySignal
).isOK();
};

Choose a reason for hiding this comment

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

Oliver after telling me it's gonna be "like 5 lines of code"

deviceId
);
}
}

Choose a reason for hiding this comment

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

Oliver after telling me it was gonna be "like 5 lines of code".

public void updateInputs(GyroIOInputs inputs) {
// refresh all status signals
inputs.isConnected = pigeon.isConnected();
inputs.isConnected = pigeon.refreshSignals().isOK();

Choose a reason for hiding this comment

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

isOk :)

@@ -96,7 +98,7 @@ public void updateInputs(ModuleIOInputs inputs) {
inputs.driveTempCelcius = driveMotor.getTemperatureAsDouble();

// Call isConnected() to refresh all status signals

Choose a reason for hiding this comment

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

update comments

driveMotor.setBrakeMode();
} else {
driveMotor.setCoastMode();
}

Choose a reason for hiding this comment

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

🤯🤯🤯🤯🤯🤯🤯

* Returns the velocity as a double value.
*
* @return the velocity as a double value
*/

Choose a reason for hiding this comment

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

On everyones soul but mine oliver wrote these javadoc headers by hand

*
* @return the velocity as a double value
*/
public double getVelocityAsDouble() {

Choose a reason for hiding this comment

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

Units in method name (for most of the gets in here) 🥺

@Oliver-Cushman Oliver-Cushman merged commit 672865c into main Dec 13, 2024
1 check passed
@Oliver-Cushman Oliver-Cushman deleted the safe-talon branch January 5, 2025 21:33
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.

Make CTRE hardware classes safer like how we did for REV

2 participants