Skip to content

Commit

Permalink
Merge pull request #46 from tommyvdz/StepPower_fallsbackto_LapPower
Browse files Browse the repository at this point in the history
Step Power will now show Lap Power if there is no workout step.
  • Loading branch information
tommyvdz authored Feb 12, 2023
2 parents 1f9b25b + 10b4fea commit 4e037a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/RunPowerWorkoutView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,10 @@ class RunPowerWorkoutView extends WatchUi.DataField {
label = "LP "+paceLabel;
value = lapSpeed == null ? 0 : Utils.convert_speed_pace(lapSpeed, useMetric, useSpeed);
} else if (type == '6') {
if (stepPower != null) {
if(stepType >= 98){
return (lapPower == null ? 0 : (lapPower + 0.5).toNumber());
}
else if (stepPower != null) {
if (stepType < 98 && targetHigh != 0 && targetLow != 0) {
if (showColors == 1 && !single) {
if (stepPower < targetLow) {
Expand Down

0 comments on commit 4e037a4

Please sign in to comment.