diff --git a/build.gradle b/build.gradle index 924bb07..078d79d 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ publishing { release(MavenPublication) { groupId = 'org.team4099' artifactId = 'falconutils' - version = '1.1.18' + version = '1.1.19' from(components["kotlin"]) } diff --git a/src/main/kotlin/org/team4099/lib/units/derived/Controller.kt b/src/main/kotlin/org/team4099/lib/units/derived/Controller.kt index 2a3f385..f376927 100644 --- a/src/main/kotlin/org/team4099/lib/units/derived/Controller.kt +++ b/src/main/kotlin/org/team4099/lib/units/derived/Controller.kt @@ -65,10 +65,10 @@ inline val Value.perMeter get() = Value>(value) inline val Value.perInch - get() = perMeter * METERS_PER_INCH + get() = perMeter / METERS_PER_INCH inline val Value.perFoot - get() = perMeter * METERS_PER_FOOT + get() = perMeter / METERS_PER_FOOT inline val Value.perRadian get() = Value>(value) diff --git a/src/test/kotlin/team4099/controller/PIDControllerTest.kt b/src/test/kotlin/team4099/controller/PIDControllerTest.kt index 31ddb2e..8e37ee1 100644 --- a/src/test/kotlin/team4099/controller/PIDControllerTest.kt +++ b/src/test/kotlin/team4099/controller/PIDControllerTest.kt @@ -18,12 +18,12 @@ import org.team4099.lib.units.base.meters import org.team4099.lib.units.base.seconds import org.team4099.lib.units.derived.ProportionalGain import org.team4099.lib.units.derived.degrees -import org.team4099.lib.units.derived.inVoltsPerDegree +import org.team4099.lib.units.derived.inVoltsPerInch import org.team4099.lib.units.derived.inVoltsPerRotation import org.team4099.lib.units.derived.inVoltsPerRotationPerMinute import org.team4099.lib.units.derived.inVoltsPerRotationsPerMinutePerSecond import org.team4099.lib.units.derived.metersPerSecondPerMetersPerSecond -import org.team4099.lib.units.derived.perDegree +import org.team4099.lib.units.derived.perInch import org.team4099.lib.units.derived.rotations import org.team4099.lib.units.derived.volts import org.team4099.lib.units.perMinute @@ -78,9 +78,9 @@ class PIDControllerTest { @Test fun testConversion() { - val kp = 0.4.volts.perDegree + val kp = 0.4.volts.perInch - println(kp.inVoltsPerDegree) + println(kp.inVoltsPerInch) } @Test @@ -96,7 +96,7 @@ class PIDControllerTest { @Test fun testFFConversion() { - val kFF = 11.3.volts / 4.56.meters.perSecond + val kFF = 12.0.volts / 4.1675.meters.perSecond val testSensor = LinearMechanismSensor(