From 10b4fea22779c760fc9a7fd301d64afa39b2144c Mon Sep 17 00:00:00 2001 From: Tommy van de Zande <58692106+tommyvdz@users.noreply.github.com> Date: Sun, 12 Feb 2023 14:30:01 +0100 Subject: [PATCH] Added a check for stepType to the drawMetric logic for StepPower. If the steptype is 98 or higher then it will return lap power instead. This way you can use one layout position to always display the most relevant metric. --- source/RunPowerWorkoutView.mc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/RunPowerWorkoutView.mc b/source/RunPowerWorkoutView.mc index 475cc84..c6130a6 100644 --- a/source/RunPowerWorkoutView.mc +++ b/source/RunPowerWorkoutView.mc @@ -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) {