1
0
Fork 0
sd2
radex 2024-05-24 21:01:34 +02:00
parent 9307c59b3e
commit fe46fc625d
Signed by: radex
SSH Key Fingerprint: SHA256:hvqRXAGG1h89yqnS+cyFTLKQbzjWD4uXIqw7Y+0ws30
5 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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();

View File

@ -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;

View File

@ -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

Binary file not shown.