Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/ZeDMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,10 +731,12 @@ bool ZeDMD::Open(uint16_t width, uint16_t height)

bool ZeDMD::OpenSpi(uint32_t speed, uint8_t framePause, uint16_t width, uint16_t height)
{
uint16_t realHeight = height == 16 ? 32 : height; // 128x16 is rendered as 128x32
Comment thread
PastorL69 marked this conversation as resolved.
Outdated

m_pZeDMDSpi->SetSpeed(speed);
m_pZeDMDSpi->SetFramePause(framePause);
m_pZeDMDSpi->SetWidth(width);
m_pZeDMDSpi->SetHeight(height);
m_pZeDMDSpi->SetHeight(realHeight);

m_spi = m_pZeDMDSpi->Connect();

Expand All @@ -745,7 +747,7 @@ bool ZeDMD::OpenSpi(uint32_t speed, uint8_t framePause, uint16_t width, uint16_t

m_pFrameBuffer = (uint8_t*)malloc(ZEDMD_MAX_WIDTH * ZEDMD_MAX_HEIGHT * 3);
m_pScaledFrameBuffer = (uint8_t*)malloc(ZEDMD_MAX_WIDTH * ZEDMD_MAX_HEIGHT * 3);
m_pRgb565Buffer = (uint8_t*)malloc(width * height * 2);
m_pRgb565Buffer = (uint8_t*)malloc(width * realHeight * 2);

m_pZeDMDSpi->Run();
}
Expand Down
Loading