Hello @StefanoL ,
I think I found the issue.
The start and end position of the circle use int16 so after some time of incrementing 60 times per second they overflow which creates the unexpected behavior.
I fixed the issue by adding the following lines of code at line number 59 :
// to fix the overflow of arc start and arc end.
if(circle.getArcStart()>360 && circle.getArcEnd()>360)
{
circle.updateArc(circle.getArcStart()-360, circle.getArcEnd()-360);
}
I also added two text area to display the value of the start and end position :
//to debug and see what is happening
Unicode::snprintf(textAreaStartBuffer, 10, "%06d", circle.getArcStart());
Unicode::snprintf(textAreaEndBuffer, 10, "%06d", circle.getArcEnd());
textAreaEnd.invalidate();
textAreaStart.invalidate();
Hope this fix your problem!
I will escalate the issue to modify the tutorial.
Hope this helps.
Don’t hesitate to give us a feedback or give more precisions and tell us if the issue is solved! :smiling_face_with_smiling_eyes: