From 587586a585a9351f6fdd6b548332c9298c6c6191 Mon Sep 17 00:00:00 2001 From: Robert Atkinson Date: Sat, 28 Nov 2015 21:37:02 -0800 Subject: [PATCH] fix RESET_ENCODERs awating bug Former-commit-id: 13c173bca0872052fcf438cd434d84f548e54631 Former-commit-id: ebcda1838c690e9fa53d14d9ced6eb285a38e48c --- .../library/internal/EasyModernMotorController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernMotorController.java b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernMotorController.java index bb2feadab57..e9ee69da6b1 100644 --- a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernMotorController.java +++ b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernMotorController.java @@ -314,8 +314,8 @@ private void deusurpDevices() // to the USB device actually happen when we issue them. if (mode == RunMode.RESET_ENCODERS) { - // Unclear if this is needed - while (this.getMotorTargetPosition(motor) != 0) + // Unclear if this is needed, but anecdotes from (e.g.) Dryw seem to indicate that it is + while (this.getMotorCurrentPosition(motor) != 0) { waitForNextReadComplete(); }