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

Add method to MotorErrors.java to check if a CANSparkMax is currently overheated #61

Merged
merged 3 commits into from
May 15, 2024

Conversation

FriedLongJohns
Copy link
Contributor

Unfortunately I don't think anyone wants to read this, so I left the method as multiple lines.

public static boolean isSparkMaxOveheated(CANSparkMax spark){return spark.getMotorTempurature > spark.TemperatureLimits.get(spark.getDeviceId());}

Copy link
Member

@CoolSpy3 CoolSpy3 left a comment

Choose a reason for hiding this comment

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

This is the right idea, but it could be affected by the same bug mentioned in #37. Take a look at the code added in #41. It would also be nice to have methods which accept both the CANSparkMax object as well as its CAN id.

@CoolSpy3 CoolSpy3 added enhancement New feature or request Non-Breaking Change This PR will introduce new backwards-compatible functionality labels Jul 21, 2023
@brettle brettle dismissed CoolSpy3’s stale review May 15, 2024 02:11

The PR does no harm and can be easier than searching log files for the warnings. Further improvements can be made in future PRs.

@brettle brettle merged commit 1b73533 into master May 15, 2024
3 checks passed
@brettle brettle deleted the motorOverheatGibber branch May 15, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Non-Breaking Change This PR will introduce new backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants