Skip to content

Commit

Permalink
HUB75 - fix hasRGB and missing override
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Oct 4, 2024
1 parent f7b8828 commit c356846
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion wled00/bus_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions wled00/bus_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c356846

Please sign in to comment.