From 5bff91229ff08d03350f2b1dac4d494c1b231321 Mon Sep 17 00:00:00 2001 From: RobertAtkinson Date: Tue, 13 Oct 2015 16:11:21 -0700 Subject: [PATCH] fix EasyLegacyMotorController.getPosition() Former-commit-id: 353875b981cabb07960093b3c56be623c546e351 Former-commit-id: 957fcdaf52c61efd141bc2276977f7f693f036ca --- .../library/internal/EasyLegacyMotorController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyMotorController.java b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyMotorController.java index c6452f2a3a5..26ac87641af 100644 --- a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyMotorController.java +++ b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyMotorController.java @@ -445,7 +445,7 @@ private synchronized void disarm() @Override public int getMotorCurrentPosition(int motor) { this.validateMotor(motor); - byte[] bytes = this.i2cDeviceClient.read(mpMotorRegMotorPower[motor], cbEncoder); + byte[] bytes = this.i2cDeviceClient.read(mpMotorRegCurrentEncoderValue[motor], cbEncoder); return TypeConversion.byteArrayToInt(bytes); }