From 1d5ac77857aa9e728eb99300573d180aa108ff97 Mon Sep 17 00:00:00 2001 From: Markus Kalkbrenner Date: Tue, 10 Jun 2025 08:45:05 +0200 Subject: [PATCH 1/6] use libserum v2.2.0-concentrate.5 --- include/DMDUtil/DMDUtil.h | 2 +- platforms/config.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/DMDUtil/DMDUtil.h b/include/DMDUtil/DMDUtil.h index d31ce5d1..95fbeff6 100644 --- a/include/DMDUtil/DMDUtil.h +++ b/include/DMDUtil/DMDUtil.h @@ -2,7 +2,7 @@ #define DMDUTIL_VERSION_MAJOR 0 // X Digits #define DMDUTIL_VERSION_MINOR 9 // Max 2 Digits -#define DMDUTIL_VERSION_PATCH 1 // Max 2 Digits +#define DMDUTIL_VERSION_PATCH 2 // Max 2 Digits #define _DMDUTIL_STR(x) #x #define DMDUTIL_STR(x) _DMDUTIL_STR(x) diff --git a/platforms/config.sh b/platforms/config.sh index 1167187b..a46c3b2b 100755 --- a/platforms/config.sh +++ b/platforms/config.sh @@ -3,7 +3,7 @@ set -e LIBZEDMD_SHA=154772800e8f36378c629f066bfee563862728ac -LIBSERUM_SHA=9e071b9b0062352476786ff578368c7dc019ac07 +LIBSERUM_SHA=607bee2ab6e73a08a28f207a42be676e967cf876 LIBPUPDMD_SHA=124f45e5ddd59ceb339591de88fcca72f8c54612 if [ -z "${BUILD_TYPE}" ]; then From 666eb49de77c50f9ec54b40dd6991dc37c3fcfc2 Mon Sep 17 00:00:00 2001 From: Markus Kalkbrenner Date: Tue, 10 Jun 2025 11:37:44 +0200 Subject: [PATCH 2/6] added AddRGB24DMD() to allow setting an "external" DMD --- include/DMDUtil/DMD.h | 1 + src/DMD.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/DMDUtil/DMD.h b/include/DMDUtil/DMD.h index 66dcb9af..e636e1c0 100644 --- a/include/DMDUtil/DMD.h +++ b/include/DMDUtil/DMD.h @@ -156,6 +156,7 @@ class DMDUTILAPI DMD void DumpDMDRaw(); LevelDMD* CreateLevelDMD(uint16_t width, uint16_t height, bool sam); bool DestroyLevelDMD(LevelDMD* pLevelDMD); + void AddRGB24DMD(RGB24DMD* pRGB24DMD); RGB24DMD* CreateRGB24DMD(uint16_t width, uint16_t height); bool DestroyRGB24DMD(RGB24DMD* pRGB24DMD); ConsoleDMD* CreateConsoleDMD(bool overwrite, FILE* out = stdout); diff --git a/src/DMD.cpp b/src/DMD.cpp index f72fb9bb..64b63102 100644 --- a/src/DMD.cpp +++ b/src/DMD.cpp @@ -280,11 +280,16 @@ bool DMD::DestroyLevelDMD(LevelDMD* pLevelDMD) return false; } -RGB24DMD* DMD::CreateRGB24DMD(uint16_t width, uint16_t height) +void DMD::AddRGB24DMD(RGB24DMD* pRGB24DMD) { - RGB24DMD* const pRGB24DMD = new RGB24DMD(width, height); m_rgb24DMDs.push_back(pRGB24DMD); if (!m_pRGB24DMDThread) m_pRGB24DMDThread = new std::thread(&DMD::RGB24DMDThread, this); +} + +RGB24DMD* DMD::CreateRGB24DMD(uint16_t width, uint16_t height) +{ + RGB24DMD* const pRGB24DMD = new RGB24DMD(width, height); + AddRGB24DMD(pRGB24DMD); return pRGB24DMD; } From a602a05f4f1d3d5d8ca671a7ffcdc164763e1b13 Mon Sep 17 00:00:00 2001 From: Markus Kalkbrenner Date: Tue, 10 Jun 2025 11:54:03 +0200 Subject: [PATCH 3/6] allow derived RGB24DMDs --- include/DMDUtil/RGB24DMD.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/DMDUtil/RGB24DMD.h b/include/DMDUtil/RGB24DMD.h index 0f5983da..649f1bd3 100644 --- a/include/DMDUtil/RGB24DMD.h +++ b/include/DMDUtil/RGB24DMD.h @@ -19,14 +19,14 @@ class DMDUTILAPI RGB24DMD RGB24DMD(uint16_t width, uint16_t height); ~RGB24DMD(); - void Update(uint8_t* pRGB24Data); + virtual void Update(uint8_t* pRGB24Data); int GetWidth() const { return m_width; } int GetHeight() const { return m_height; } int GetLength() const { return m_length; } int GetPitch() const { return m_pitch; } uint8_t* GetData(); - private: + protected: uint16_t m_width; uint16_t m_height; int m_length; From 2929d4e3e84584ecbe31a8b1914c591a9c19add9 Mon Sep 17 00:00:00 2001 From: Markus Kalkbrenner Date: Tue, 10 Jun 2025 14:06:18 +0200 Subject: [PATCH 4/6] added log info aboput RGB24DMD thread --- src/DMD.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DMD.cpp b/src/DMD.cpp index 64b63102..59cab720 100644 --- a/src/DMD.cpp +++ b/src/DMD.cpp @@ -283,7 +283,10 @@ bool DMD::DestroyLevelDMD(LevelDMD* pLevelDMD) void DMD::AddRGB24DMD(RGB24DMD* pRGB24DMD) { m_rgb24DMDs.push_back(pRGB24DMD); - if (!m_pRGB24DMDThread) m_pRGB24DMDThread = new std::thread(&DMD::RGB24DMDThread, this); + if (!m_pRGB24DMDThread) { + m_pRGB24DMDThread = new std::thread(&DMD::RGB24DMDThread, this); + Log(DMDUtil_LogLevel_INFO, "RGB24DMDThread started"); + } } RGB24DMD* DMD::CreateRGB24DMD(uint16_t width, uint16_t height) From 70c1d7b626810229e0b4bfb21685efc03fe48c4c Mon Sep 17 00:00:00 2001 From: Markus Kalkbrenner Date: Tue, 10 Jun 2025 15:00:58 +0200 Subject: [PATCH 5/6] const --- include/DMDUtil/DMD.h | 4 ++-- src/DMD.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/DMDUtil/DMD.h b/include/DMDUtil/DMD.h index e636e1c0..56851d9e 100644 --- a/include/DMDUtil/DMD.h +++ b/include/DMDUtil/DMD.h @@ -156,8 +156,8 @@ class DMDUTILAPI DMD void DumpDMDRaw(); LevelDMD* CreateLevelDMD(uint16_t width, uint16_t height, bool sam); bool DestroyLevelDMD(LevelDMD* pLevelDMD); - void AddRGB24DMD(RGB24DMD* pRGB24DMD); - RGB24DMD* CreateRGB24DMD(uint16_t width, uint16_t height); + void AddRGB24DMD(RGB24DMD* const pRGB24DMD); + RGB24DMD* const CreateRGB24DMD(uint16_t width, uint16_t height); bool DestroyRGB24DMD(RGB24DMD* pRGB24DMD); ConsoleDMD* CreateConsoleDMD(bool overwrite, FILE* out = stdout); bool DestroyConsoleDMD(ConsoleDMD* pConsoleDMD); diff --git a/src/DMD.cpp b/src/DMD.cpp index 59cab720..5a1966b7 100644 --- a/src/DMD.cpp +++ b/src/DMD.cpp @@ -280,7 +280,7 @@ bool DMD::DestroyLevelDMD(LevelDMD* pLevelDMD) return false; } -void DMD::AddRGB24DMD(RGB24DMD* pRGB24DMD) +void DMD::AddRGB24DMD(RGB24DMD* const pRGB24DMD) { m_rgb24DMDs.push_back(pRGB24DMD); if (!m_pRGB24DMDThread) { @@ -289,7 +289,7 @@ void DMD::AddRGB24DMD(RGB24DMD* pRGB24DMD) } } -RGB24DMD* DMD::CreateRGB24DMD(uint16_t width, uint16_t height) +RGB24DMD* const DMD::CreateRGB24DMD(uint16_t width, uint16_t height) { RGB24DMD* const pRGB24DMD = new RGB24DMD(width, height); AddRGB24DMD(pRGB24DMD); From a8e35853a81dded5d29480498f94a53c36d7e22e Mon Sep 17 00:00:00 2001 From: Markus Kalkbrenner Date: Tue, 10 Jun 2025 16:35:55 +0200 Subject: [PATCH 6/6] added log --- include/DMDUtil/DMD.h | 4 ++-- src/DMD.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/DMDUtil/DMD.h b/include/DMDUtil/DMD.h index 56851d9e..e636e1c0 100644 --- a/include/DMDUtil/DMD.h +++ b/include/DMDUtil/DMD.h @@ -156,8 +156,8 @@ class DMDUTILAPI DMD void DumpDMDRaw(); LevelDMD* CreateLevelDMD(uint16_t width, uint16_t height, bool sam); bool DestroyLevelDMD(LevelDMD* pLevelDMD); - void AddRGB24DMD(RGB24DMD* const pRGB24DMD); - RGB24DMD* const CreateRGB24DMD(uint16_t width, uint16_t height); + void AddRGB24DMD(RGB24DMD* pRGB24DMD); + RGB24DMD* CreateRGB24DMD(uint16_t width, uint16_t height); bool DestroyRGB24DMD(RGB24DMD* pRGB24DMD); ConsoleDMD* CreateConsoleDMD(bool overwrite, FILE* out = stdout); bool DestroyConsoleDMD(ConsoleDMD* pConsoleDMD); diff --git a/src/DMD.cpp b/src/DMD.cpp index 5a1966b7..b609c35b 100644 --- a/src/DMD.cpp +++ b/src/DMD.cpp @@ -280,16 +280,17 @@ bool DMD::DestroyLevelDMD(LevelDMD* pLevelDMD) return false; } -void DMD::AddRGB24DMD(RGB24DMD* const pRGB24DMD) +void DMD::AddRGB24DMD(RGB24DMD* pRGB24DMD) { m_rgb24DMDs.push_back(pRGB24DMD); + Log(DMDUtil_LogLevel_INFO, "Added RGB24DMD"); if (!m_pRGB24DMDThread) { m_pRGB24DMDThread = new std::thread(&DMD::RGB24DMDThread, this); Log(DMDUtil_LogLevel_INFO, "RGB24DMDThread started"); } } -RGB24DMD* const DMD::CreateRGB24DMD(uint16_t width, uint16_t height) +RGB24DMD* DMD::CreateRGB24DMD(uint16_t width, uint16_t height) { RGB24DMD* const pRGB24DMD = new RGB24DMD(width, height); AddRGB24DMD(pRGB24DMD);