diff --git a/util/PIDFController.java b/util/PIDFController.java index 5e2c082..e603181 100644 --- a/util/PIDFController.java +++ b/util/PIDFController.java @@ -266,7 +266,7 @@ public void copyTo(SparkBase motorController, SparkBaseConfig motorConfig, Close //need to check - if we just update a few parameters in SparkMaxConfig, do the rest stay the same as previously set? //otherwise do we need to pull all the prior parameters out of the motorController's sparkmaxconfig and reapply them? motorConfig.closedLoop.pid(this.getP(), this.getI(), this.getD(), slot); - motorConfig.closedLoop.feedForward.kV(this.getF(), slot); + motorConfig.closedLoop.feedForward.kV(this.getF() * 12.0, slot); // sparkmax does not like POSITIVE_INFINITY, thows param erron on id 17... 0.0 should workaround // minor hack: if izone is not set, base class defaults to POSITIVITE_INFINITY double izone = (this.getIZone() == Double.POSITIVE_INFINITY) ? 0.0 : this.getIZone(); @@ -295,7 +295,7 @@ public void copyChangesTo(SparkBase motorController, SparkBaseConfig motorConfig if (!m_changes || motorConfig == null || motorController == null) return; motorConfig.closedLoop.pid(this.getP(), this.getI(), this.getD(), slot); - motorConfig.closedLoop.feedForward.kV(this.getF(), slot); + motorConfig.closedLoop.feedForward.kV(this.getF() * 12.0, slot); motorConfig.closedLoop.iZone(getIZone(), slot); // send to HW if we have a pid change, use async so robot loop isn't delayed