In the compute function, I have:
totalAscent = info.totalAscent;
and in the onUpdate function I have:
totalAscent = (totalAscent == null ? 0 : totalAscent)*metersConversionFactor;
I found that if I move the null check assignment from onUpdate to compute, everything works fine.
Is there a race condition or something that causes an issue when I assign a value to totalAscent in the onCompute function?? I've seen a similar issue with elapsed distance where for the first second it is correct, then it goes to 0, then it goes back to being correct. Have others seen this type of behavior? I am really flummoxed! How does the displayed value of total ascent change rapidly? It's as if onUpdate is being called repeatedly instead of once per second, and total ascent somehow has different values each time.
This is on a 735xt with firmware 3.20 using the current SDK.