From 4b72620f04afcf7ef56d6e4bf6d7be01984071b9 Mon Sep 17 00:00:00 2001 From: Ishan1522 Date: Thu, 25 Jul 2024 21:57:28 -0400 Subject: [PATCH] so many fucking booleans --- .../java/frc/robot/subsystems/swerve/DriveSubsystem.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/swerve/DriveSubsystem.java b/src/main/java/frc/robot/subsystems/swerve/DriveSubsystem.java index c89d1ec..429bf36 100644 --- a/src/main/java/frc/robot/subsystems/swerve/DriveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/swerve/DriveSubsystem.java @@ -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; @@ -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; } } @@ -435,7 +435,7 @@ public boolean getStatorCurrents() { public boolean isSlipping() { if (getSkidRatio() > 1.0) { - isSlipping = true; + return true; } return false; }