WLEDMM specific adjustments
This commit is contained in:
@@ -309,6 +309,10 @@ void BusPwm::setPixelColor(uint16_t pix, uint32_t c) {
|
||||
//does no index check
|
||||
uint32_t BusPwm::getPixelColor(uint16_t pix) {
|
||||
if (!_valid) return 0;
|
||||
#if 1
|
||||
// WLEDMM stick with the old code - we don't have cctICused
|
||||
return RGBW32(_data[0], _data[1], _data[2], _data[3]);
|
||||
#else
|
||||
// TODO getting the reverse from CCT is involved (a quick approximation when CCT blending is ste to 0 implemented)
|
||||
switch (_type) {
|
||||
case TYPE_ANALOG_1CH: //one channel (white), relies on auto white calculation
|
||||
@@ -325,6 +329,7 @@ uint32_t BusPwm::getPixelColor(uint16_t pix) {
|
||||
return RGBW32(_data[0], _data[1], _data[2], 0);
|
||||
}
|
||||
return RGBW32(_data[0], _data[0], _data[0], _data[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void BusPwm::show() {
|
||||
|
||||
@@ -390,10 +390,12 @@ class PolyBus {
|
||||
};
|
||||
static void* create(uint8_t busType, uint8_t* pins, uint16_t len, uint8_t channel, uint16_t clock_kHz = 0U) {
|
||||
#if defined(ARDUINO_ARCH_ESP32) && !(defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3))
|
||||
#if defined(WLEDMM_FASTPATH) && !defined(WLEDMM_SLOWPATH) // WLEDMM only for fastpath builds
|
||||
// NOTE: "channel" is only used on ESP32 (and its variants) for RMT channel allocation
|
||||
// since 0.15.0-b3 I2S1 is favoured for classic ESP32 and moved to position 0 (channel 0) so we need to subtract 1 for correct RMT allocation
|
||||
if (channel > 0) channel--; // accommodate I2S1 which is used as 1st bus on classic ESP32
|
||||
#endif
|
||||
#endif
|
||||
void* busPtr = nullptr;
|
||||
switch (busType) {
|
||||
case I_NONE: break;
|
||||
|
||||
Reference in New Issue
Block a user