From 3bc8f45fd706bf7cd05f1aff22e160bcb6f3b3e6 Mon Sep 17 00:00:00 2001 From: Robert Atkinson Date: Thu, 11 Feb 2016 16:49:18 -0800 Subject: [PATCH] fix EasyLegacyMotorController.setMotorChannelMode bug when using RESET_ENCODERS Former-commit-id: d8ae3b9c09fbbcbb8ddf3d4080ec4d420c83edc3 Former-commit-id: b1499b2f7808fe07a58a3c24c378b1d84bff396b --- .../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 4859979b197..aeb070ef4d9 100644 --- a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyMotorController.java +++ b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyMotorController.java @@ -400,7 +400,7 @@ private boolean isArmed() if (mode == RunMode.RESET_ENCODERS) { // Unclear if this is needed - while (this.getMotorTargetPosition(motor) != 0) + while (this.getMotorCurrentPosition(motor) != 0) { if (!this.isArmed()) break; Thread.yield();