Skip to content

Commit

Permalink
reduced debug logging and skip data frames early if serum is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Jul 2, 2024
1 parent cbda0fd commit 628ecbd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/DMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ void DMD::QueueUpdate(const std::shared_ptr<Update> dmdUpdate, bool buffered)
m_updateBufferQueuePosition.store(updateBufferQueuePosition, std::memory_order_release);
m_dmdFrameReady.store(true, std::memory_order_release);

Log(DMDUtil_LogLevel_DEBUG, "Queued Frame: position=%d, mode=%d, depth=%d", updateBufferQueuePosition,
dmdUpdate->mode, dmdUpdate->depth);
// Log(DMDUtil_LogLevel_DEBUG, "Queued Frame: position=%d, mode=%d, depth=%d", updateBufferQueuePosition,
// dmdUpdate->mode, dmdUpdate->depth);

if (buffered)
{
Expand Down Expand Up @@ -623,6 +623,8 @@ void DMD::ZeDMDThread()
{
bufferPosition = GetNextBufferQueuePosition(bufferPosition, updateBufferQueuePosition);

if (m_pSerum && !IsSerumMode(m_pUpdateBufferQueue[bufferPosition]->mode)) continue;

// Note: libzedmd has its own update detection.

if (m_pUpdateBufferQueue[bufferPosition]->hasData || m_pUpdateBufferQueue[bufferPosition]->hasSegData)
Expand Down Expand Up @@ -959,6 +961,8 @@ void DMD::PixelcadeDMDThread()
{
bufferPosition = GetNextBufferQueuePosition(bufferPosition, updateBufferQueuePosition);

if (m_pSerum && !IsSerumMode(m_pUpdateBufferQueue[bufferPosition]->mode)) continue;

if (m_pUpdateBufferQueue[bufferPosition]->hasData || m_pUpdateBufferQueue[bufferPosition]->hasSegData)
{
uint16_t width = m_pUpdateBufferQueue[bufferPosition]->width;
Expand Down Expand Up @@ -1172,6 +1176,8 @@ void DMD::RGB24DMDThread()
{
bufferPosition = GetNextBufferQueuePosition(bufferPosition, updateBufferQueuePosition);

if (m_pSerum && !IsSerumMode(m_pUpdateBufferQueue[bufferPosition]->mode)) continue;

if (!m_rgb24DMDs.empty() &&
(m_pUpdateBufferQueue[bufferPosition]->hasData || m_pUpdateBufferQueue[bufferPosition]->hasSegData))
{
Expand Down

0 comments on commit 628ecbd

Please sign in to comment.