Skip to content

Commit

Permalink
so many fucking booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan1522 committed Jul 26, 2024
1 parent 13da0e2 commit 4b72620
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/subsystems/swerve/DriveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public boolean isSkidding() {
boolean collisionDetected = isCollisionDetected();
boolean isStatorGood = getStatorCurrents();
// boolean
if (skidRatio > 1 || collisionDetected || isStatorGood) {
if (skidRatio > 1 || collisionDetected || !isStatorGood) {
return true;
}
return false;
Expand Down Expand Up @@ -426,7 +426,7 @@ public boolean[] getStatorStatus() {
public boolean getStatorCurrents() {
boolean[] statorStatus = getStatorStatus();
for (int i = 0; i < statorStatus.length; i++) {
if (!statorStatus[i]) {
if (statorStatus[i]) {
return true;
}
}
Expand All @@ -435,7 +435,7 @@ public boolean getStatorCurrents() {

public boolean isSlipping() {
if (getSkidRatio() > 1.0) {
isSlipping = true;
return true;
}
return false;
}
Expand Down

0 comments on commit 4b72620

Please sign in to comment.