Fix hr zones are not continous
This commit is contained in:
parent
629416d0a1
commit
254bbb3764
@ -58,7 +58,7 @@ fun UserProfile.getUserPowerZone(power: Int): PowerZone? {
|
|||||||
|
|
||||||
fun UserProfile.getUserHrZone(hr: Int): HrZone? {
|
fun UserProfile.getUserHrZone(hr: Int): HrZone? {
|
||||||
heartRateZones.forEachIndexed { index, zone ->
|
heartRateZones.forEachIndexed { index, zone ->
|
||||||
if (hr in zone.min..<zone.max) {
|
if (hr in zone.min..zone.max) {
|
||||||
return HrZone.entries[index]
|
return HrZone.entries[index]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user