Closed mmoskal closed 6 years ago
The new pixel format in images should be now exactly what you guys expect. I think you just need to do the following, but please test.
CC @pelikhan
diff --git a/source/BrainPadDisplay.cpp b/source/BrainPadDisplay.cpp index ea28e88..c8fb835 100644 --- a/source/BrainPadDisplay.cpp +++ b/source/BrainPadDisplay.cpp @@ -69,14 +69,6 @@ void BrainPadDisplay::flush() { } void BrainPadDisplay::writeScreenBuffer(uint8_t* buffer) { - for (int x = 0; x < 128; x++) { - for (int y = 0; y < 64; y++) { - int offset = y * 16 + x / 8; - int mask = 0x80 >> (x & 7); - - drawNativePixel(x, y, (buffer[offset] & mask) > 0); - } - } - + memcpy(vram + 1, buffer, vramSize - 1); flush(); }
wait on https://github.com/Microsoft/pxt-brainpad/issues/61
Updated in v0.0.15 https://github.com/ghi-electronics/codal-brainpad/releases/tag/v0.0.15
v0.0.16 https://github.com/ghi-electronics/codal-brainpad/releases/tag/v0.0.16
https://github.com/Microsoft/pxt-brainpad/pull/77
The new pixel format in images should be now exactly what you guys expect. I think you just need to do the following, but please test.
CC @pelikhan