Skip to content

Commit 896dc42

Browse files
authored
use libserum v2.2.0-concentrate.5 (#78)
* use libserum v2.2.0-concentrate.5 * added AddRGB24DMD() to allow setting an "external" DMD
1 parent f1d9015 commit 896dc42

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

include/DMDUtil/DMD.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ class DMDUTILAPI DMD
156156
void DumpDMDRaw();
157157
LevelDMD* CreateLevelDMD(uint16_t width, uint16_t height, bool sam);
158158
bool DestroyLevelDMD(LevelDMD* pLevelDMD);
159+
void AddRGB24DMD(RGB24DMD* pRGB24DMD);
159160
RGB24DMD* CreateRGB24DMD(uint16_t width, uint16_t height);
160161
bool DestroyRGB24DMD(RGB24DMD* pRGB24DMD);
161162
ConsoleDMD* CreateConsoleDMD(bool overwrite, FILE* out = stdout);

include/DMDUtil/DMDUtil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#define DMDUTIL_VERSION_MAJOR 0 // X Digits
44
#define DMDUTIL_VERSION_MINOR 9 // Max 2 Digits
5-
#define DMDUTIL_VERSION_PATCH 1 // Max 2 Digits
5+
#define DMDUTIL_VERSION_PATCH 2 // Max 2 Digits
66

77
#define _DMDUTIL_STR(x) #x
88
#define DMDUTIL_STR(x) _DMDUTIL_STR(x)

include/DMDUtil/RGB24DMD.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class DMDUTILAPI RGB24DMD
1919
RGB24DMD(uint16_t width, uint16_t height);
2020
~RGB24DMD();
2121

22-
void Update(uint8_t* pRGB24Data);
22+
virtual void Update(uint8_t* pRGB24Data);
2323
int GetWidth() const { return m_width; }
2424
int GetHeight() const { return m_height; }
2525
int GetLength() const { return m_length; }
2626
int GetPitch() const { return m_pitch; }
2727
uint8_t* GetData();
2828

29-
private:
29+
protected:
3030
uint16_t m_width;
3131
uint16_t m_height;
3232
int m_length;

platforms/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
LIBZEDMD_SHA=154772800e8f36378c629f066bfee563862728ac
6-
LIBSERUM_SHA=9e071b9b0062352476786ff578368c7dc019ac07
6+
LIBSERUM_SHA=607bee2ab6e73a08a28f207a42be676e967cf876
77
LIBPUPDMD_SHA=124f45e5ddd59ceb339591de88fcca72f8c54612
88

99
if [ -z "${BUILD_TYPE}" ]; then

src/DMD.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,20 @@ bool DMD::DestroyLevelDMD(LevelDMD* pLevelDMD)
280280
return false;
281281
}
282282

283+
void DMD::AddRGB24DMD(RGB24DMD* pRGB24DMD)
284+
{
285+
m_rgb24DMDs.push_back(pRGB24DMD);
286+
Log(DMDUtil_LogLevel_INFO, "Added RGB24DMD");
287+
if (!m_pRGB24DMDThread) {
288+
m_pRGB24DMDThread = new std::thread(&DMD::RGB24DMDThread, this);
289+
Log(DMDUtil_LogLevel_INFO, "RGB24DMDThread started");
290+
}
291+
}
292+
283293
RGB24DMD* DMD::CreateRGB24DMD(uint16_t width, uint16_t height)
284294
{
285295
RGB24DMD* const pRGB24DMD = new RGB24DMD(width, height);
286-
m_rgb24DMDs.push_back(pRGB24DMD);
287-
if (!m_pRGB24DMDThread) m_pRGB24DMDThread = new std::thread(&DMD::RGB24DMDThread, this);
296+
AddRGB24DMD(pRGB24DMD);
288297
return pRGB24DMD;
289298
}
290299

0 commit comments

Comments
 (0)