From c356846d907ea5373285278ff1dd2200f1455d4e Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Fri, 4 Oct 2024 19:10:53 +0100 Subject: [PATCH] HUB75 - fix hasRGB and missing override --- wled00/bus_manager.cpp | 5 ++++- wled00/bus_manager.h | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 52c8814b..778039c0 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -823,6 +823,9 @@ void BusNetwork::cleanup() { BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) { _valid = false; + _hasRgb = true; + _hasWhite = false; + mxconfig.double_buff = false; // default to off, known to cause issue with some effects but needs more memory // mxconfig.driver = HUB75_I2S_CFG::ICN2038S; // experimental - use specific shift register driver //mxconfig.latch_blanking = 3; @@ -1019,7 +1022,7 @@ uint32_t BusHub75Matrix::getPixelColor(uint16_t pix) const { return getBitFromArray(_ledsDirty, pix) ? IS_DARKGREY: IS_BLACK; // just a hack - we only know if the pixel is black or not } -void BusHub75Matrix::setBrightness(uint8_t b, bool immediate) { +void BusHub75Matrix::setBrightness(uint8_t b) { _bri = b; if (_bri > 238) _bri=238; display->setBrightness(_bri); diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 72f78518..80758977 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -326,12 +326,10 @@ class BusNetwork : public Bus { class BusHub75Matrix : public Bus { public: BusHub75Matrix(BusConfig &bc); - bool hasRGB() { return true; } - bool hasWhite() { return false; } - void setPixelColor(uint16_t pix, uint32_t c); + void setPixelColor(uint16_t pix, uint32_t c) override; uint32_t getPixelColor(uint16_t pix) const override; void show() override; - void setBrightness(uint8_t b, bool immediate); + void setBrightness(uint8_t b) override; uint8_t getPins(uint8_t* pinArray) const override; void deallocatePins(); void cleanup();