drawArc Wrong After Calling ActivityMonitor

Hello all together,

this is my first post :D

I have a stragne behavior with drawArc.
It is very simple: In the function onUpdate() i would like to draw a arc.
But this is only possible above the call to get infos from ActivityMonitor???
Especially to set the "degreeStart". 270 dergee must be on position 6 o´clock.
All given degreeStart numbers are always somewhere between 7 and 9 o`clock.
(for sure on top of my code is "using Toybox.ActivityMonitor as ActMonitor;" defined)

Wrong working code:
var actsteps;
var stepGoal;

stepGoal = ActMonitor.getInfo().stepGoal;
actsteps = ActMonitor.getInfo().steps;

dc.drawArc(width / 2, height / 2, 70, 0, 270, 90);


works fine! Here is 270 deree at the 6 o`clock position.
var actsteps;
var stepGoal;

dc.drawArc(width / 2, height / 2, 70, 0, 270, 90);

stepGoal = ActMonitor.getInfo().stepGoal;
actsteps = ActMonitor.getInfo().steps;


This code is also reproducible in the "Analog" sample.

Is this a bug or a feature?
  • Former Member
    Former Member over 8 years ago
    Hello,

    I ran into this issue today. I'm on 2.2.3. Is there any date for the fix?
  • Some have worked around the problem by making this call (or similar) before drawing the arcs you actually want to display, but after the ActivityMonitor.getInfo() call...

    dc.drawArc(-1, -1, 0, Gfx.ARC_CLOCKWISE, 1, 2)


    Thanks go to Petr.Koula for the workaround.
  • As Brian said in a previous post, this is related to a compiler issue in msvc 9.0, which we use to build the Windows version of the CIQ simulator. We have a fix in place (we'll be building future releases with a newer compiler version), but I don't yet have a specific date when that will go into effect. I anticipate sometime around mid-year at the latest.