Cleanup and rename to generic Hub75 rather than SmartMatrix
This commit is contained in:
@@ -963,7 +963,6 @@ lib_deps_V4_M =
|
||||
paulstoffregen/OneWire@ ^2.3.7 ; used for USERMOD_DALLASTEMPERATURE -> need newer release with bugfixes for -S3; still requires TEMPERATURE_PIN < 46
|
||||
olikraus/U8g2@ ^2.34.5 ; used for USERMOD_FOUR_LINE_DISPLAY -> need newer version with bugfixes for arduino-esp32 v2.0.4 (Wire inititialization)
|
||||
${common_mm.animartrix_lib_deps}
|
||||
https://github.com/netmindz/SmartMatrix.git#platform-2-support
|
||||
|
||||
build_flags_XL =
|
||||
-D USERMOD_WEATHER ; WLEDMM usermod
|
||||
@@ -1463,7 +1462,7 @@ build_flags = ${esp32_4MB_V4_S_base.build_flags}
|
||||
; -D WLED_DEBUG
|
||||
; -D SR_DEBUG
|
||||
; -D MIC_LOGGER
|
||||
-D WLED_ENABLE_SMARTMATRIX -D NO_GFX
|
||||
-D WLED_ENABLE_HUB75MATRIX -D NO_GFX
|
||||
|
||||
lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation
|
||||
; RAM: [=== ] 25.1% (used 82176 bytes from 327680 bytes)
|
||||
@@ -2187,5 +2186,5 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-inden
|
||||
; -D SR_DEBUG
|
||||
; -D MIC_LOGGER
|
||||
-D WLED_USE_PSRAM -DBOARD_HAS_PSRAM ; tells WLED that PSRAM shall be used
|
||||
-D WLED_ENABLE_SMARTMATRIX -D NO_GFX ;-D SPIRAM_FRAMEBUFFER
|
||||
-D WLED_ENABLE_HUB75MATRIX -D NO_GFX ;-D SPIRAM_FRAMEBUFFER
|
||||
-D DEFAULT_LED_TYPE=60
|
||||
@@ -460,9 +460,9 @@ void BusNetwork::cleanup() {
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
#ifdef WLED_ENABLE_SMARTMATRIX
|
||||
#ifdef WLED_ENABLE_HUB75MATRIX
|
||||
|
||||
BusSmartMatrix::BusSmartMatrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) {
|
||||
BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) {
|
||||
|
||||
mxconfig.double_buff = false; // <------------- Turn on double buffer
|
||||
mxconfig.mx_width = 64;
|
||||
@@ -562,7 +562,7 @@ uint8_t oePin = 14;
|
||||
USER_PRINTLN("MatrixPanel_I2S_DMA started");
|
||||
}
|
||||
|
||||
void BusSmartMatrix::setPixelColor(uint16_t pix, uint32_t c) {
|
||||
void BusHub75Matrix::setPixelColor(uint16_t pix, uint32_t c) {
|
||||
r = R(c);
|
||||
g = G(c);
|
||||
b = B(c);
|
||||
@@ -571,7 +571,7 @@ void BusSmartMatrix::setPixelColor(uint16_t pix, uint32_t c) {
|
||||
display->drawPixelRGB888(x, y, r, g, b);
|
||||
}
|
||||
|
||||
void BusSmartMatrix::setBrightness(uint8_t b, bool immediate) {
|
||||
void BusHub75Matrix::setBrightness(uint8_t b, bool immediate) {
|
||||
this->display->setBrightness(b);
|
||||
}
|
||||
#endif
|
||||
@@ -604,10 +604,10 @@ int BusManager::add(BusConfig &bc) {
|
||||
USER_PRINTF("BusManager::add(bc.type=%u)\n", bc.type);
|
||||
if (bc.type >= TYPE_NET_DDP_RGB && bc.type < 96) {
|
||||
busses[numBusses] = new BusNetwork(bc);
|
||||
#ifdef WLED_ENABLE_SMARTMATRIX
|
||||
} else if (bc.type == TYPE_SMARTMATRIX) {
|
||||
USER_PRINTLN("BusManager::add - Adding BusSmartMatrix");
|
||||
busses[numBusses] = new BusSmartMatrix(bc);
|
||||
#ifdef WLED_ENABLE_HUB75MATRIX
|
||||
} else if (bc.type >= TYPE_HUB75MATRIX && bc.type <= (TYPE_HUB75MATRIX + 10)) {
|
||||
USER_PRINTLN("BusManager::add - Adding BusHub75Matrix");
|
||||
busses[numBusses] = new BusHub75Matrix(bc);
|
||||
#endif
|
||||
} else if (IS_DIGITAL(bc.type)) {
|
||||
busses[numBusses] = new BusDigital(bc, numBusses, colorOrderMap);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef BusManager_h
|
||||
#define BusManager_h
|
||||
|
||||
#ifdef WLED_ENABLE_SMARTMATRIX
|
||||
#ifdef WLED_ENABLE_HUB75MATRIX
|
||||
#include <ESP32-HUB75-MatrixPanel-I2S-DMA.h>
|
||||
#endif
|
||||
/*
|
||||
@@ -41,7 +41,7 @@ struct BusConfig {
|
||||
if (type >= TYPE_NET_DDP_RGB && type < 96) nPins = 4; //virtual network bus. 4 "pins" store IP address
|
||||
else if (type > 47) nPins = 2;
|
||||
else if (type > 40 && type < 46) nPins = NUM_PWM_PINS(type);
|
||||
else if (type == TYPE_SMARTMATRIX) nPins = 0;
|
||||
else if (type == TYPE_HUB75MATRIX) nPins = 0;
|
||||
for (uint8_t i = 0; i < nPins; i++) pins[i] = ppins[i];
|
||||
}
|
||||
|
||||
@@ -330,10 +330,10 @@ class BusNetwork : public Bus {
|
||||
byte *_data;
|
||||
};
|
||||
|
||||
#ifdef WLED_ENABLE_SMARTMATRIX
|
||||
class BusSmartMatrix : public Bus {
|
||||
#ifdef WLED_ENABLE_HUB75MATRIX
|
||||
class BusHub75Matrix : public Bus {
|
||||
public:
|
||||
BusSmartMatrix(BusConfig &bc);
|
||||
BusHub75Matrix(BusConfig &bc);
|
||||
|
||||
bool hasRGB() { return true; }
|
||||
bool hasWhite() { return false; }
|
||||
@@ -347,18 +347,13 @@ class BusSmartMatrix : public Bus {
|
||||
}
|
||||
}
|
||||
|
||||
bool canShow() {
|
||||
// busy swapping still
|
||||
return true; // return !backgroundLayer->isSwapPending();
|
||||
}
|
||||
|
||||
void setBrightness(uint8_t b, bool immediate);
|
||||
|
||||
// uint8_t getPins(uint8_t* pinArray) {} // todo
|
||||
|
||||
void cleanup() {}
|
||||
|
||||
~BusSmartMatrix() {
|
||||
~BusHub75Matrix() {
|
||||
cleanup();
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
#define TYPE_P9813 53
|
||||
#define TYPE_LPD6803 54
|
||||
|
||||
#define TYPE_SMARTMATRIX 100
|
||||
#define TYPE_HUB75MATRIX 100 // 100 - 110
|
||||
|
||||
//Network types (master broadcast) (80-95)
|
||||
#define TYPE_NET_DDP_RGB 80 //network DDP RGB bus (master broadcast bus)
|
||||
|
||||
@@ -368,9 +368,9 @@ ${i+1}:
|
||||
<!--option value="81">E1.31 RGB (network)</option-->
|
||||
<option value="82">Art-Net RGB (network)</option>
|
||||
<option value="88">DDP RGBW (network)</option>
|
||||
<option value="101">SmartMatrix 32x32</option>
|
||||
<option value="102">SmartMatrix 64x32</option>
|
||||
<option value="103">SmartMatrix 64x64</option>
|
||||
<option value="101">Hub75Matrix 32x32</option>
|
||||
<option value="102">Hub75Matrix 64x32</option>
|
||||
<option value="103">Hub75Matrix 64x64</option>
|
||||
</select><br>
|
||||
<div id="co${i}" style="display:inline">Color Order:
|
||||
<select name="CO${i}">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user