From 8be47f8638bb498abc026d145ec9ba66d9f472ea Mon Sep 17 00:00:00 2001 From: Liam Fruzyna Date: Thu, 2 Jan 2025 10:56:46 -0600 Subject: [PATCH] Added a temporary current limit setter to WsSpark --- .../org/wildstang/hardware/roborio/outputs/WsSpark.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java b/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java index 69bf8d3..fb0b6ca 100644 --- a/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java +++ b/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java @@ -154,6 +154,14 @@ public void setCurrentLimit(int stallLimitAmps, int freeLimitAmps, int limitRPM) motor.burnFlash(); } + /** + * Sets the current limit, but does not burn flash. Never use in init + * @param limit the amount of amps drawn before limiting + */ + public void tempCurrentLimit(int limit){ + motor.setSmartCurrentLimit(limit, limit, 0); + } + /** * Enables voltage compensation. */