Simulator no longer updating Activity.getActivityInfo().elapsedDistance

This has suddenly happened. 

I had been developing a data field quite successfully and it now works well on my watch FR255.

I had to write conditional lines of debug code to spoof the objects workoutStep and workoutInterval step using Monkey C's duck typing to make development easier as the simulator doesn't bother to implement this, essentially writing my own conditional workout simulation.

Yesterday the device simulator stopped bothering to reliably update elapsed distance. It is not null. It might update once to a non-zero value.

Why do I have to do work that should have been implemented in the simulator.

Why should I have to debug your development environment in order to develop?

I am worried that you have one or more inexperienced developers who you are entrusting to do tasks that for you are low priority. They can do lots of damage that will be hard and take time to fix.

P.S.

You have fixed the embarrassing tiny font debacle on two value data screens. I would feel ashamed about this software being released out of beta.

What about fixing:

  The failure of ALL CIQ fields to run (app error icon) on structured workouts when accessed via the race app. (no sandbox / memory?)

  The failure of structured repeats to work when used with track mode. (skipping recovery, bonkers additional distance at a monotonic speed)

  The failure of structured repeats to update after editing until the activity is exited and re-entered.

You have serious software quality control issues. Your watches aren't cheap. There really is no excuse.

P.S. dont reply to this if it is going to be a dumb and patronising one.

  • OK. 

    I just implemented my own simulated workout steps and activity info when debugging (not true conditional compilation but OK ish I guess).

    It is crude but works well enough for my needs.

     

    using Toybox.Activity;

    using Toybox.System;

    using Toybox.Math;

    function isDebugging(){

    return MySim has :isDebugging;

    }

    (:release)

    module MySim{

    function getDummyWorkoutStep(){}

    function tick(){}

    function getActivityInfo(){ return Activity.getActivityInfo();}

    }

    (:debug)

    module MySim{

    var mDummyActivityInfo = null;

    var mDummyWorkoutStepNumber = 0;

    var mDummyWorkoutStep = null;

    class MyStep{

    public var durationType = null;

    public var durationValue = null;

    public var targetType = null;

    public var targetValueHigh = null;

    public var targetValueLow = null;

    function initialize(dType, duration, iType, low, high){

    durationType = dType;

    durationValue = duration;

    targetType = iType;

    targetValueLow = low;

    targetValueHigh = high;

    }

    }

    class MyWorkoutStep{

    public var step = null;

    public var intensity = Activity.WORKOUT_INTENSITY_ACTIVE;

    private var mPhaseNumber = 0;

    function initialize(intensityClass, newStep){

    intensity = intensityClass;

    step = newStep;

    }

    }

    function isDebugging(){

    }

    function getDummyWorkoutStep(){

    if (mDummyWorkoutStep == null){

    mDummyWorkoutStep = new MyWorkoutStep(Activity.WORKOUT_INTENSITY_WARMUP, new MyStep(Activity.WORKOUT_STEP_DURATION_TIME, 5, Activity.WORKOUT_STEP_TARGET_OPEN, null, null));

    IntervalStep.mUpdateStartingTimeAndDistances();

    } 

    return mDummyWorkoutStep;

    }

    function tick(){

    if (IntervalStep.mGetNormalisedDurationLeft() <= 0.0){

    mDummyWorkoutStepNumber++;

    if (mDummyWorkoutStepNumber >= 4){

    mDummyWorkoutStep.intensity = Activity.WORKOUT_INTENSITY_COOLDOWN;

    mDummyWorkoutStep.step = new MyStep(Activity.WORKOUT_STEP_DURATION_OPEN, null, Activity.WORKOUT_STEP_TARGET_OPEN, null, null);

    } else {

    if (mDummyWorkoutStepNumber % 2){

    mDummyWorkoutStep.intensity = Activity.WORKOUT_INTENSITY_ACTIVE;

    mDummyWorkoutStep.step = new MyStep(Activity.WORKOUT_STEP_DURATION_DISTANCE, 50, Activity.WORKOUT_STEP_TARGET_SPEED, 3.33-0.1, 3.33+0.1);

    //mDummyWorkoutStep.step = new MyStep(Activity.WORKOUT_STEP_DURATION_DISTANCE, 400, Activity.WORKOUT_STEP_TARGET_OPEN, null, null);

    } else {

    mDummyWorkoutStep.intensity = Activity.WORKOUT_INTENSITY_RECOVERY;

    mDummyWorkoutStep.step = new MyStep(Activity.WORKOUT_STEP_DURATION_TIME, 5, Activity.WORKOUT_STEP_TARGET_OPEN, null, null);

    }

    IntervalStep.mUpdateStartingTimeAndDistances();

    }

    }

    }

    /*////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Spoofing the Activity.getActivityInfo() return result

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

     

    function getActivityInfo(){

    if (mDummyActivityInfo == null){

    mDummyActivityInfo = new myActivityInfo();

    }

    mDummyActivityInfo.tick();

    return mDummyActivityInfo;

    }

    class myActivityInfo{

    var timerState = Activity.TIMER_STATE_OFF;

    var currentSpeed = 3.33;

    var timerTime = 0;

    var elapsedDistance = 0;

    var cadence = 180;

    function tick(){

    timerState = Activity.getActivityInfo().timerState;

    if (timerState == Activity.TIMER_STATE_ON){

    timerTime += 1000;

    elapsedDistance += currentSpeed;

    }

    cadence = 60.0 * currentSpeed / 1.08;

    }

    }

    ////////////////////////////////////

    }