microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

led strip buffer is not initialized to zero after 8th pixel. #1305

Open xmeow opened 1 year ago

xmeow commented 1 year ago

In practice the phenomenon is that all pixels start from 8th with some random colors. image

image

a manual memset(state->pxbuffer, 0, state->maxpixels*3); actually resolve this issue, but jd_alloc should already set the mem to zero. https://github.com/microsoft/jacdac-c/blob/main/services/ledstrip.c#L495

@smfox10

pelikhan commented 1 year ago

@xmeow is this still an issue?

xmeow commented 1 year ago

I think this exist in the makecode editor with effects. In our local build system we made a manual memory reset to the pixel buffers.

pelikhan commented 12 months ago

Do you have a MakeCode program to repro this?