Missing Maximums

It appears that the Simulator does not generate Maximum Power, Cadence or HR or Speed. And doesn't generate Average Speed...

Unless I'm doing something wrong. Not a big deal. Anyone else get any of these values in the sim? Now I need to double check CIQ gets these in a real device. I'm sure they do... Trust but verify. Easy enough to track these in code if not.

  • Just checked on my WIN PC (SDK 7.4.3)

    Works for me! All avg and max values are generated.
    Regardless of whether I am executing a fitfile or simply simulating.

  • Thanks! Would help if I read the API guide. max not maximum! Ugh :-)

  • SPEED seems broken. But the others are working...

    System.println("SPD:" + myInfo.currentSpeed + "/" + myInfo.averageSpeed + "/" + myInfo.maxSpeed);

    SPD:8.789512/0.000000/0.000000

    SPD:8.929472/0.000000/0.000000

    SPD:8.724196/0.000000/0.000000

    SPD:8.509591/0.000000/0.000000

  • Strange…
    avg and max speed work for me (for Edge devices).

  • Is the timer running?

    Average / max metrics won’t be calculated for periods that the timer isn’t running. (I know that wouldn’t explain why only speed is apparently affected for you.)

  • I don’t know what the rest of your code looks like, but there’s no point in having independent has checks for ActivityInfo.averagePower and maxPower, especially if you don’t have a has check for currentPower (this is where seeing the rest of your code would be significant.)

    Yes, there are some devices (including Edges) which don’t support power, but I think you can safely assume that if one of the power fields is supported, all of them are.

    if (myInfo has :currentPower) { // here I am assuming that “myInfo” is an instance of ActivityInfo
     // do stuff with currentPower, averagePower and maxPower
    }

  • Now I need to double check CIQ gets these in a real device. I'm sure they do... Trust but verify. Easy enough to track these in code if not.

    For what it’s worth, all of that stuff works for me on a real device or in a sim. (current/average/max versions of basic activity info.)

    If you want to test these metrics individually without writing a data field to display some or all of them, you can use my data field AppBuilder 5, which lets you specify an “excel-type” formula to specify what data to display, and supports all of the basic ActivityInfo metrics.

    The ones you are interested in would be:

    Speed, MaxSpeed, AvgSpeed,
    Cadence, MaxCadence, AvgCadence,
    HR, maxHR, AvgHR,
    Power, MaxPower, AvgPower

    Ofc it might be a pain to change the formula in the app settings multiple times to test each metric, but it’s possible to test multiple metrics at once. e.g. to display 3 metrics at the same time, separated by spaces, you could use a formula such as:

    Speed + ' ' + MaxSpeed + ' ' + AvgSpeed

    There are 4 clones of the app, so that could be another way to test multiple metrics at once. Ofc you may just find it easier to sideload your own full screen data field that just tests all the metrics at once, in your own way.