Skip to content

Commit

Permalink
fix velocity ff
Browse files Browse the repository at this point in the history
  • Loading branch information
sswadkar committed Feb 26, 2023
1 parent b041b0d commit c2b7d3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ publishing {
release(MavenPublication) {
groupId = 'org.team4099'
artifactId = 'falconutils'
version = '1.1.14'
version = '1.1.15'

from(components["kotlin"])
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/org/team4099/lib/units/MechanismUnits.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface MechanismSensor<U : UnitKey> {
derivativeGain: DerivativeGain<Velocity<U>, Volt>,
): Double

fun velocityFeedforwardToRawUnits(velocityFeedforward: VelocityFeedforward<Velocity<U>, Volt>): Double
fun velocityFeedforwardToRawUnits(velocityFeedforward: VelocityFeedforward<U, Volt>): Double
}

class LinearMechanismSensor(
Expand Down Expand Up @@ -157,7 +157,7 @@ class LinearMechanismSensor(
}

override inline fun velocityFeedforwardToRawUnits(
velocityFeedforward: VelocityFeedforward<Velocity<Meter>, Volt>
velocityFeedforward: VelocityFeedforward<Meter, Volt>
): Double {
return velocityFeedforward.value * velocityToRawUnits(1.0.meters.perSecond) /
compensationVoltage.inVolts * fullPowerThrottle
Expand Down Expand Up @@ -246,7 +246,7 @@ class AngularMechanismSensor(
}

override inline fun velocityFeedforwardToRawUnits(
velocityFeedforward: VelocityFeedforward<Velocity<Radian>, Volt>
velocityFeedforward: VelocityFeedforward<Radian, Volt>
): Double {
return velocityFeedforward.value * velocityToRawUnits(1.0.radians.perSecond) /
compensationVoltage.inVolts * fullPowerThrottle
Expand Down

0 comments on commit c2b7d3e

Please sign in to comment.