adafruit / Adafruit_Protomatter

RGB matrix library for Arduino
57 stars 20 forks source link

Possible `_PM_esp32commonTimerInit` bug? #69

Open J-MR-T opened 9 months ago

J-MR-T commented 9 months ago

I just tried to half-assedly port the S3 code I need to arduino-esp 3.0.0-alpha2, which uses a refactored timer API (https://github.com/espressif/arduino-esp32/pull/7904 and https://github.com/espressif/arduino-esp32/pull/7906), to get it to somewhat work, I mostly only had to substitute a few calls and numbers, but one change stood out to me, and I think it might be a bug in the current version too, so I'd like to bring it to someones attention ^^'.

I'm talking about _PM_esp32commonTimerInit, specifically the last line. Shouldn't this be core->timer? Because if the if statement above gets executed, core->timer is overwritten, but not the local timer variable, which still contains the old core->timer from before the timerBegin call.

When I changed the call in line 94 to use core->timer, my matrix started to light up, whereas something crashed along the way if I compile without that change. All on arduino-esp 3.0.0-alpha2.

I'm happy to provide more information if necessary.

Cheers :)

ladyada commented 8 months ago

hiya yes we have to update this library to ESP 3 - thanks for the hint, we'll take a look!

ladyada commented 8 months ago

also if you have a PR please submit it in case our port has bugs