Skip to content

Commit

Permalink
Fix: Mic distance label in imperial mode
Browse files Browse the repository at this point in the history
  • Loading branch information
svetter committed Jul 11, 2024
1 parent bbd4d68 commit d08b29b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const val cmPerFoot = 30.48

fun lengthText(
length: Double,
useImperial: Boolean = false,
useImperial: Boolean,
numDecimalPlaces: Int = if (useImperial) 2 else 1): String {
return if (useImperial) {
"%.${numDecimalPlaces}fin".format(length / cmPerInch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class MainActivity : AppCompatActivity() {
}

private fun updateMicDistanceLabel() {
micDistanceValueLabel.text = lengthText(currentMicDistance)
micDistanceValueLabel.text = lengthText(currentMicDistance, useImperial)
}

private fun updateMicAngleLabel() {
Expand Down

0 comments on commit d08b29b

Please sign in to comment.