Closed fettliu closed 2 years ago
I don’t have time to look into this now, but there was a bug in some other drawing code that was using too small of a variable to store the product of two numbers, and the number overflowed. You might look at the drawelipse code for any of those issues, or just change all the variables used in that code to larger types and see if that fixes it
Thanks, I'll try to fix it
When the random number appears to be zero, the radius passed to drawEllipse, it will dead-loop. It's simple though and took a long time to find 😄
Thanks for finding that, and sorry it took a long time to find!
Would adding this to the top of drawEllipse() fix the issue?
// radius must be > 0
if(!radiusX || !radiusY)
return;
Would adding this to the top of drawEllipse() fix the issue?
// radius must be > 0 if(!radiusX || !radiusY) return;
Yes, very stable now
I haven't committed your fix to the repo yet, but it's in my local copy, ready to commit when I switch back to working on SmartMatrix Library again. Thanks for your help!
Hardware: ESP32-WROOM-32 (4MB) Software: Arduino+FeatureDemo example
Situation: Under arduino, up to a few thousand times, it is bound to die. Under esp-idf, a fixed number of times, inevitably dead.(I made a transplant version)
Code (add to void loop(), resolution keep the default can also be):
Is there something I did wrong somewhere, even with the default demo, running for a while will crash, in my 64*64 setting.