Skip to content

Commit fc938dc

Browse files
committed
combine 2 frames
1 parent 65e4d42 commit fc938dc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/dmdreader.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ uint8_t framebuf2[MAX_WIDTH * MAX_HEIGHT * MAX_BITSPERPIXEL / 8 *
123123
MAX_MEMORY_OVERHEAD] __attribute__((aligned(4)));
124124
uint8_t framebuf3[MAX_WIDTH * MAX_HEIGHT * MAX_BITSPERPIXEL / 8 *
125125
MAX_MEMORY_OVERHEAD] __attribute__((aligned(4)));
126+
uint8_t framebuf4[MAX_WIDTH * MAX_HEIGHT * MAX_BITSPERPIXEL / 8 *
127+
MAX_MEMORY_OVERHEAD] __attribute__((aligned(4)));
126128
uint8_t *currentFrameBuffer = framebuf1;
127129
uint8_t *frameBufferToSend = framebuf2;
128130
uint8_t *prevFrameBuffer = framebuf3;
@@ -539,6 +541,14 @@ void dmd_dma_handler() {
539541
combineArraysLUT4bit((uint8_t *)framebuf, prevFrameBuffer, source_bytes);
540542
}
541543
memcpy(prevFrameBuffer, (uint8_t *)framebuf, source_bytes);
544+
} else if (DMD_GOTTLIEB == dmd_type) {
545+
memcpy(prevFrameBuffer, (uint8_t *)framebuf, source_bytes);
546+
if (prevFrameBuffer == framebuf3) {
547+
prevFrameBuffer == framebuf4;
548+
} else {
549+
prevFrameBuffer == framebuf3;
550+
}
551+
combineArraysLUT4bit((uint8_t *)framebuf, prevFrameBuffer, source_bytes);
542552
}
543553

544554
// deal with whitestar line oversampling directly within framebuf

0 commit comments

Comments
 (0)