Skip to content

Commit

Permalink
fix calibration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lexicalninja committed Apr 24, 2020
1 parent 278841b commit 9506bf1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,11 @@ class FitnessMachineSerializer {
message.spinDownStatus = SpinDownStatus.getFromBits(bytes[1].toInt() and 0xFF)
if (message.spinDownStatus == SpinDownStatus.success && bytes.size > 3) {
// Milliseconds attached, convert to seconds
message.spinDownTime = ((bytes[2].toInt() and 0xFF) or ((bytes[3].toInt() and 0xFF)) shl 8) as Double / 1000.0
message.spinDownTime = ((bytes[2].toInt() and 0xFF) or ((bytes[3].toInt() and 0xFF)) shl 8).toDouble() / 1000.0
}
if (message.spinDownStatus == SpinDownStatus.error && bytes.size > 3) {
// Milliseconds attached, convert to seconds
message.spinDownTime = ((bytes[2].toInt() and 0xFF) or ((bytes[3].toInt() and 0xFF)) shl 8) as Double / 1000.0
message.spinDownTime = ((bytes[2].toInt() and 0xFF) or ((bytes[3].toInt() and 0xFF)) shl 8).toDouble() / 1000.0
}
}
}
Expand Down

0 comments on commit 9506bf1

Please sign in to comment.