mirror of
https://github.com/dyuri/garmin-repafield.git
synced 2025-12-16 19:24:01 +00:00
bugfix: hr zone display if zone is below 1
This commit is contained in:
parent
26418b0d6c
commit
50d65c7858
@ -1,5 +1,5 @@
|
||||
<properties>
|
||||
<property id="appVersion" type="string">1.1.0</property>
|
||||
<property id="appVersion" type="string">1.1.1</property>
|
||||
<property id="themeColor" type="string">0</property>
|
||||
<property id="themeColor2" type="string">0088FF</property>
|
||||
<property id="themeColor3" type="string">FFFF00</property>
|
||||
|
||||
@ -19,7 +19,9 @@ function displayHr(hr as Number, type as Number, zones as Array<Number>) as Stri
|
||||
} else if (type == 2) {
|
||||
var hrzsize = zones.size();
|
||||
for (var i = 0; i < hrzsize; i++) {
|
||||
if (hr < zones[i] || i == hrzsize - 1) {
|
||||
if (i == 0 && hr < zones[i]) {
|
||||
return "-";
|
||||
} else if (hr < zones[i] || i == hrzsize - 1) {
|
||||
return ((hr - zones[i - 1]) / (zones[i] - zones[i - 1]).toFloat() + i).format("%.1f");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user