From 0586765f996278861c759310075246c7cf531f7a Mon Sep 17 00:00:00 2001 From: Robert Atkinson Date: Sun, 6 Dec 2015 13:43:14 -0800 Subject: [PATCH] ModernRobotics color sensor had a field added; adjust Former-commit-id: b4d930cd3098b8a1abcca8c23bd47bea3dfbeaa6 Former-commit-id: 2d6a7cb5143312fee6dcb9c00f09e40f8e9572b4 --- .../java/org/swerverobotics/library/internal/MemberUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/MemberUtil.java b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/MemberUtil.java index e635589097b..6dfed879a1e 100644 --- a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/MemberUtil.java +++ b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/MemberUtil.java @@ -206,7 +206,7 @@ static LegacyModule legacyModuleOfHiTechnicColorSensor(ColorSensor sensor) } static DeviceInterfaceModule deviceModuleOfModernColorSensor(ColorSensor sensor) { - return Util.getPrivateObjectField(sensor, 0); + return Util.getPrivateObjectField(sensor, 1); // 0 is now i2c address } static int portOfHiTechnicColorSensor(ColorSensor sensor) { @@ -214,7 +214,7 @@ static int portOfHiTechnicColorSensor(ColorSensor sensor) } static int portOfModernColorSensor(ColorSensor sensor) { - return Util.getPrivateIntField(sensor, 7); + return Util.getPrivateIntField(sensor, 8); } //----------------------------------------------------------------------------------------------