Complete
over 3 years ago

Bug: Activity has :getCurrentWorkoutStep is true even when no workout is selected

I tried this on my Fenix 5s plus and also a user of one of my datafields experienced this with his Fenix 5 plus. Code where this check is used:

if (Activity has :getCurrentWorkoutStep) {

always returns "true" on these watches. Also when no workout is selected.

In the Garmin simulator this isn't the case and the code runs correct.

Parents
  • Just to clarify, do you expect "Activity has :getCurrentWorkoutStep" to be true only when a workout is selected?

    Because that just checks that the feature is available. I would expect that check to return false for any device which doesn't support CIQ 3.2, and return true for any device which does support 3.2. I think Fenix 5 Plus now supports CIQ 3.2 in firmware and in the simulator, so I would expect the check to be true.

    I would expect the full code to look like this:

    var currentStep = null;
    
    if (Activity has :getCurrentWorkoutStep) {
      currentStep = Activity.getCurrentWorkoutStep();
    }
    
    if (currentStep != null) {
        //...
    }

    Sorry if that's what you were implying.

Comment
  • Just to clarify, do you expect "Activity has :getCurrentWorkoutStep" to be true only when a workout is selected?

    Because that just checks that the feature is available. I would expect that check to return false for any device which doesn't support CIQ 3.2, and return true for any device which does support 3.2. I think Fenix 5 Plus now supports CIQ 3.2 in firmware and in the simulator, so I would expect the check to be true.

    I would expect the full code to look like this:

    var currentStep = null;
    
    if (Activity has :getCurrentWorkoutStep) {
      currentStep = Activity.getCurrentWorkoutStep();
    }
    
    if (currentStep != null) {
        //...
    }

    Sorry if that's what you were implying.

Children
No Data