mirror of
https://github.com/radex/radmatrix.git
synced 2024-10-26 23:14:50 +00:00
fixes
This commit is contained in:
parent
9307c59b3e
commit
fe46fc625d
5 changed files with 6 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
|||
uint16_t gfxFrameLengthsBuffer[12000] = {0};
|
||||
uint16_t frameCount = 0;
|
||||
|
||||
uint8_t gfxFrameBuffer[2048] = {0};
|
||||
uint8_t gfxFrameBuffer[6400] = {0};
|
||||
|
||||
bool gfx_decoder_loadNextFrame() {
|
||||
// load frame from SD card
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
extern uint16_t gfxFrameLengthsBuffer[12000];
|
||||
extern uint16_t frameCount;
|
||||
extern uint8_t gfxFrameBuffer[2048];
|
||||
extern uint8_t gfxFrameBuffer[6400];
|
||||
|
||||
bool gfx_decoder_loadNextFrame();
|
||||
bool gfx_decoder_handleLoop();
|
||||
|
|
|
@ -142,7 +142,7 @@ void leds_render() {
|
|||
|
||||
// placeholder at 0; pixels 0, 1, 2
|
||||
pxValues = *(reinterpret_cast<uint32_t *>(buffer));
|
||||
// pxValues = pxValues << 8;
|
||||
pxValues = pxValues << 8;
|
||||
pio_sm_put_blocking(pusher_pio, pusher_sm, pxValues >> brightnessPhase);
|
||||
|
||||
// pixels 3, 4, 5, placeholder at 6
|
||||
|
@ -161,9 +161,8 @@ void leds_render() {
|
|||
pxValues = *(reinterpret_cast<uint32_t *>(buffer + 13));
|
||||
pio_sm_put_blocking(pusher_pio, pusher_sm, pxValues >> brightnessPhase);
|
||||
|
||||
// pixels 17, 18, placeholder, 19
|
||||
// pixels 17, 18, 19, placeholder
|
||||
pxValues = *(reinterpret_cast<uint32_t *>(buffer + 17));
|
||||
// pxValues = (pxValues & 0x0000ffff) | ((pxValues & 0x00ff0000) << 8);
|
||||
pio_sm_put_blocking(pusher_pio, pusher_sm, pxValues >> brightnessPhase);
|
||||
|
||||
buffer += 20;
|
||||
|
|
|
@ -270,7 +270,8 @@ int32_t sd_loadNextFrame() {
|
|||
// get size of frame png
|
||||
auto frameSize = gfxFrameLengthsBuffer[frameIdx];
|
||||
if (frameSize > sizeof(gfxFrameBuffer)) {
|
||||
Serial.println("Frame too large");
|
||||
Serial.print("Frame too large: ");
|
||||
Serial.println(frameSize);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
BIN
text.pxm
BIN
text.pxm
Binary file not shown.
Loading…
Reference in a new issue