From a3c059026c0b28afae9d8f71517a994c40bbf5b4 Mon Sep 17 00:00:00 2001 From: MEFThunders7035 <157488669+MEFThunders7035@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:27:22 +0300 Subject: [PATCH] fix recursive call error Idiot me... --- .../java/frc/utils/sim_utils/ColorSensorV3Wrapped.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/frc/utils/sim_utils/ColorSensorV3Wrapped.java b/src/main/java/frc/utils/sim_utils/ColorSensorV3Wrapped.java index 742b3e8..9780606 100644 --- a/src/main/java/frc/utils/sim_utils/ColorSensorV3Wrapped.java +++ b/src/main/java/frc/utils/sim_utils/ColorSensorV3Wrapped.java @@ -52,7 +52,7 @@ public static void setRGBD(int red, int green, int blue, int distance) { public int getRed() { // we check if getRed() is 0 because the color sensor returns 0 when its not being "simulated" // as this is only used for unit tests. - if (RobotBase.isReal() || colorSensor == null || colorSensor.getRed() != 0) { + if (RobotBase.isReal() || colorSensor == null || super.getRed() != 0) { return super.getRed(); } return rgbd[0]; @@ -60,7 +60,7 @@ public int getRed() { @Override public int getGreen() { - if (RobotBase.isReal() || colorSensor == null || colorSensor.getGreen() != 0) { + if (RobotBase.isReal() || colorSensor == null || super.getGreen() != 0) { return super.getGreen(); } return rgbd[1]; @@ -68,7 +68,7 @@ public int getGreen() { @Override public int getBlue() { - if (RobotBase.isReal() || colorSensor == null || colorSensor.getBlue() != 0) { + if (RobotBase.isReal() || colorSensor == null || super.getBlue() != 0) { return super.getBlue(); } return rgbd[2]; @@ -76,7 +76,7 @@ public int getBlue() { @Override public int getProximity() { - if (RobotBase.isReal() || colorSensor == null || colorSensor.getProximity() != 0) { + if (RobotBase.isReal() || colorSensor == null || super.getProximity() != 0) { return super.getProximity(); } return rgbd[3];