diff --git a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyServoController.java b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyServoController.java index 3e9ecbc13d0..c03d7ce5838 100644 --- a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyServoController.java +++ b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyLegacyServoController.java @@ -4,7 +4,6 @@ import com.qualcomm.robotcore.eventloop.opmode.OpMode; import com.qualcomm.robotcore.hardware.*; import com.qualcomm.robotcore.util.Range; -import com.qualcomm.robotcore.util.TypeConversion; import org.swerverobotics.library.BuildConfig; import org.swerverobotics.library.SynchronousOpMode; import org.swerverobotics.library.interfaces.*; @@ -270,7 +269,7 @@ public synchronized void setServoPosition(int servo, double position) { validateServo(servo); position = Range.clip(position, positionMin, positionMax); // note: runtime formerly threw on range error - double bPosition = Range.scale(position, positionMin, positionMax, bPositionMin, bPositionMax); + double bPosition = Range.scale(position, positionMin, positionMax, regPositionMin, regPositionMax); this.write(ADDRESS_CHANNEL_MAP[servo], bPosition); this.pwmEnable(); diff --git a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernServoController.java b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernServoController.java index 1b05f95a22b..aea262e7bfc 100644 --- a/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernServoController.java +++ b/SwerveRoboticsLibrary/src/main/java/org/swerverobotics/library/internal/EasyModernServoController.java @@ -36,8 +36,8 @@ public class EasyModernServoController extends EasyModernController implements S public static final double positionMin = 0.0; public static final double positionMax = 1.0; - public static final byte bPositionMin = 0; - public static final byte bPositionMax = (byte)255; + public static final double regPositionMin = 0; + public static final double regPositionMax = 255; private List servos; private final double[] servoPositions; @@ -233,7 +233,7 @@ public void setServoPosition(int servo, double position) { validateServo(servo); position = Range.clip(position, positionMin, positionMax); // note: runtime formerly threw on range error - double bPosition = Range.scale(position, positionMin, positionMax, bPositionMin, bPositionMax); + double bPosition = Range.scale(position, positionMin, positionMax, regPositionMin, regPositionMax); this.write(ADDRESS_CHANNEL_MAP[servo], bPosition); this.pwmEnable();