Skip to content

Commit

Permalink
math error
Browse files Browse the repository at this point in the history
  • Loading branch information
lexicalninja committed May 8, 2020
1 parent 1458559 commit 8604ce5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ class FitnessMachineSerializer {

fun setTargetResistanceLevel(level: Double): ByteArray {
// level = unitless res 0.1
val levelN = level.toInt() * 10
val levelN = (level * 10).toInt()
return byteArrayOf(
(ControlOpCode.setTargetResistanceLevel.bits and 0xFF).toByte(),
(levelN and 0xFF).toByte(),
Expand Down

0 comments on commit 8604ce5

Please sign in to comment.