Skip to content

Commit

Permalink
i can't freaking do math
Browse files Browse the repository at this point in the history
  • Loading branch information
sswadkar committed Mar 15, 2023
1 parent f2b17bd commit 760625a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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.18'
version = '1.1.19'

from(components["kotlin"])
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/org/team4099/lib/units/derived/Controller.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ inline val <K : UnitKey> Value<K>.perMeter
get() = Value<Fraction<K, Meter>>(value)

inline val <K : UnitKey> Value<K>.perInch
get() = perMeter * METERS_PER_INCH
get() = perMeter / METERS_PER_INCH

inline val <K : UnitKey> Value<K>.perFoot
get() = perMeter * METERS_PER_FOOT
get() = perMeter / METERS_PER_FOOT

inline val <K : UnitKey> Value<K>.perRadian
get() = Value<Fraction<K, Radian>>(value)
Expand Down
10 changes: 5 additions & 5 deletions src/test/kotlin/team4099/controller/PIDControllerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit 760625a

Please sign in to comment.