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/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/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; 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 diff --git a/src/DMD.cpp b/src/DMD.cpp index f72fb9bb..b609c35b 100644 --- a/src/DMD.cpp +++ b/src/DMD.cpp @@ -280,11 +280,20 @@ bool DMD::DestroyLevelDMD(LevelDMD* pLevelDMD) return false; } +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* DMD::CreateRGB24DMD(uint16_t width, uint16_t height) { RGB24DMD* const pRGB24DMD = new RGB24DMD(width, height); - m_rgb24DMDs.push_back(pRGB24DMD); - if (!m_pRGB24DMDThread) m_pRGB24DMDThread = new std::thread(&DMD::RGB24DMDThread, this); + AddRGB24DMD(pRGB24DMD); return pRGB24DMD; }