Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
max-heller committed Mar 9, 2023
1 parent b01be24 commit 5219ef0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Conversion/ITargetMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,16 @@ public void ApplyToWorkoutStep(WorkoutStepMesg step)
break;
case WktStepTarget.HeartRate:
step.SetTargetHrZone(targetValue);
if (high > 0)
{
step.SetCustomTargetHeartRateLow(low+100);
step.SetCustomTargetHeartRateHigh(high+100);
}
step.SetCustomTargetHeartRateLow(low);
step.SetCustomTargetHeartRateHigh(high);
break;
case WktStepTarget.Power:
step.SetTargetPowerZone(targetValue);
if (high > 0)
{
// FIXME: maybe need values above zero?
step.SetCustomTargetPowerLow(low+1);
step.SetCustomTargetPowerHigh(high+1);
// Target values need to be non-zero or Garmin ignores them
step.SetCustomTargetPowerLow(Math.Max(low, 1));
step.SetCustomTargetPowerHigh(high);
}
break;
case WktStepTarget.Speed:
Expand Down

0 comments on commit 5219ef0

Please sign in to comment.