]> git.taranathan.com Git - FRC2026.git/commitdiff
Revert "not optimized"
authorWesley28w <wesleycwong@gmail.com>
Sat, 18 Apr 2026 13:50:59 +0000 (06:50 -0700)
committerWesley28w <wesleycwong@gmail.com>
Sat, 18 Apr 2026 13:50:59 +0000 (06:50 -0700)
This reverts commit b4d50cb699706970156e48e1da1ac856e98cb515.

src/main/java/frc/robot/subsystems/Breaker/Breaker.java [deleted file]

diff --git a/src/main/java/frc/robot/subsystems/Breaker/Breaker.java b/src/main/java/frc/robot/subsystems/Breaker/Breaker.java
deleted file mode 100644 (file)
index 7f7af64..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-package frc.robot.subsystems.Breaker;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import edu.wpi.first.wpilibj.PowerDistribution;
-import edu.wpi.first.wpilibj2.command.SubsystemBase;
-
-public class Breaker extends SubsystemBase {
-    PowerDistribution pDis = new PowerDistribution();
-    List<Double> currents = new ArrayList<>();
-
-    public Breaker() {
-        currents.clear();
-    }
-    
-    @Override
-    public void periodic() {
-        currents.add(getCurrentFromPowerDistribution());
-    }
-
-    public double average(double secondsBackward) {
-        // there is a log for every 20ms and thus 50 indexes for each second
-        int totalIndexes = (int) secondsBackward * 50;
-        List<Double> trimmedCurrents = currents.subList(currents.size()-totalIndexes, currents.size());
-        double sum = 0;
-        for (double index : trimmedCurrents) {
-            sum += index;
-        }
-        
-        return sum/trimmedCurrents.size();
-    }
-
-    public double getCurrentFromPowerDistribution() {
-        return pDis.getTotalCurrent(); // not using .getCurrent() and then an arguement for the port you can get just one port
-    }
-}