Skip to content

Commit 96de7d3

Browse files
formatting
1 parent b63f4b2 commit 96de7d3

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/frc/robot/subsystems/fuelDetector/FuelDetector.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ public class FuelDetector extends SubsystemBase {
1717
NetworkTableInstance.getDefault().getStringTopic("/fuelDetector/fuelData").subscribe("");
1818

1919
public void periodic() {
20-
2120
// get fuel information, call algorithm
2221
String fuelData = fuelSub.get("");
23-
// fuelData = "0.5,0.5,0.5,0.5,1,-"; //Use for testing algorithm
22+
// fuelData = "0.5,0.5,0.5,0.5,1,;"; //Use for testing algorithm
2423
// System.out.println("fuelData: " + fuelData);
2524
FuelCoordinates[] fuels = FuelDetector.dataToFuelCoordinates(fuelData);
2625
System.out.println(
@@ -42,10 +41,7 @@ public ArrayList<FuelCoordinates> filterByHighChance(FuelCoordinates[] inputs) {
4241
public FuelSquare[][] divideIntoSquares(
4342
ArrayList<FuelCoordinates> fuelCoords, int gridWidth, int gridHeight) {
4443
FuelSquare[][] output =
45-
new FuelSquare[gridWidth + 1]
46-
[gridHeight
47-
+ 1]; // Do not change this to not add 1 to grid height and width, the code will
48-
// crash.
44+
new FuelSquare[gridWidth + 1][gridHeight + 1]; // Do not change this to not add 1 to grid height and width, the code will crash.
4945
for (int w = 0; w < output.length; w++) {
5046
for (int h = 0; h < output[w].length; h++) {
5147
output[w][h] = new FuelSquare(w, h);

0 commit comments

Comments
 (0)