code spell checking - part4 (MM specific)
This commit is contained in:
@@ -146,7 +146,7 @@ Segment::Segment(Segment &&orig) noexcept {
|
||||
orig.jMap = nullptr; //WLEDMM jMap
|
||||
}
|
||||
|
||||
// copy assignment --> overwrite segment withg orig - deletes old buffers in "this", but does not change orig!
|
||||
// copy assignment --> overwrite segment with orig - deletes old buffers in "this", but does not change orig!
|
||||
Segment& Segment::operator= (const Segment &orig) {
|
||||
DEBUG_PRINTLN(F("-- Copy-assignment segment --"));
|
||||
if (this != &orig) {
|
||||
@@ -833,7 +833,7 @@ void xyFromBlock(uint16_t &x,uint16_t &y, uint16_t i, uint16_t vW, uint16_t vH,
|
||||
|
||||
}
|
||||
|
||||
void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATTR conditionaly
|
||||
void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATTR conditionally
|
||||
{
|
||||
if (!isActive()) return; // not active
|
||||
#ifndef WLED_DISABLE_2D
|
||||
@@ -942,7 +942,7 @@ void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATT
|
||||
|
||||
uint16_t len = length();
|
||||
uint8_t _bri_t = currentBri(on ? opacity : 0);
|
||||
if (!_bri_t && !transitional && fadeTransition) return; // if _bri_t == 0 && segment is not transitionig && transitions are enabled then save a few CPU cycles
|
||||
if (!_bri_t && !transitional && fadeTransition) return; // if _bri_t == 0 && segment is not transitioning && transitions are enabled then save a few CPU cycles
|
||||
if (_bri_t < 255) {
|
||||
byte r = scale8(R(col), _bri_t);
|
||||
byte g = scale8(G(col), _bri_t);
|
||||
@@ -1223,7 +1223,7 @@ void Segment::fade_out(uint8_t rate) {
|
||||
int g1 = G(color);
|
||||
int b1 = B(color);
|
||||
|
||||
int wdelta = mappedRate_r * (w2 - w1); // WLEDMM use receprocal - its faster
|
||||
int wdelta = mappedRate_r * (w2 - w1); // WLEDMM use reciprocal - its faster
|
||||
int rdelta = mappedRate_r * (r2 - r1);
|
||||
int gdelta = mappedRate_r * (g2 - g1);
|
||||
int bdelta = mappedRate_r * (b2 - b1);
|
||||
@@ -1502,7 +1502,7 @@ void WS2812FX::enumerateLedmaps() {
|
||||
void WS2812FX::finalizeInit(void)
|
||||
{
|
||||
//reset segment runtimes
|
||||
suspendStripService = true; // WELDMM avoid running effects on an incomplete strip
|
||||
suspendStripService = true; // WLEDMM avoid running effects on an incomplete strip
|
||||
for (segment &seg : _segments) {
|
||||
seg.markForReset();
|
||||
seg.resetIfRequired();
|
||||
@@ -1583,11 +1583,11 @@ void WS2812FX::finalizeInit(void)
|
||||
DEBUG_PRINTLN(F("Loading custom ledmaps"));
|
||||
deserializeMap(); // (re)load default ledmap
|
||||
_isServicing = false; // WLEDMM
|
||||
suspendStripService = false; // WELDMM ready, run !
|
||||
suspendStripService = false; // WLEDMM ready, run !
|
||||
}
|
||||
|
||||
// WLEDMM wait until strip is idle (=not servicing).
|
||||
// on 8266 this function does nothing, because we can only do "buisy waiting" on ESP32
|
||||
// on 8266 this function does nothing, because we can only do "busy waiting" on ESP32
|
||||
#define MAX_IDLE_WAIT_MS 50 // seems to work in most cases
|
||||
void WS2812FX::waitUntilIdle(void) {
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_PROTECT_SERVICE)
|
||||
@@ -1755,7 +1755,7 @@ void WS2812FX::estimateCurrentAndLimitBri() {
|
||||
uint8_t scaleB = (scaleI > 255) ? 255 : scaleI;
|
||||
uint8_t newBri = scale8(_brightness, scaleB);
|
||||
// to keep brightness uniform, sets virtual busses too - softhack007: apply reductions immediately
|
||||
if (scaleB < 255) busses.setBrightness(scaleB, true); // NPB-LG has already applied brightness, so its suffifient to post-apply scaling ==> use scaleB instead of newBri
|
||||
if (scaleB < 255) busses.setBrightness(scaleB, true); // NPB-LG has already applied brightness, so its sufficient to post-apply scaling ==> use scaleB instead of newBri
|
||||
busses.setBrightness(newBri, false); // set new brightness for next frame
|
||||
//currentMilliamps = (powerSum0 * newBri) / puPerMilliamp; // for NPBrightnessBus
|
||||
currentMilliamps = (powerSum0 * scaleB) / puPerMilliamp; // for NPBus-LG
|
||||
@@ -1787,7 +1787,7 @@ void WS2812FX::show(void) {
|
||||
if (diff > 0) fpsCurr = 1000 / diff;
|
||||
_cumulativeFps = (3 * _cumulativeFps + fpsCurr +2) >> 2; // "+2" for proper rounding (2/4 = 0.5)
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_FASTPATH)
|
||||
_lastShow = b4show; // WLEDMM this is more accurate, however it also icreases CPU load - strip.service will run more frequently
|
||||
_lastShow = b4show; // WLEDMM this is more accurate, however it also increases CPU load - strip.service will run more frequently
|
||||
#else
|
||||
_lastShow = now;
|
||||
#endif
|
||||
@@ -2234,7 +2234,7 @@ bool WS2812FX::deserializeMap(uint8_t n) {
|
||||
if (n) sprintf(fileName +7, "%d", n); //WLEDMM: trick to not include 0 in ledmap.json
|
||||
strcat(fileName, ".json");
|
||||
isFile = WLED_FS.exists(fileName);
|
||||
} else { //WLEDM add segment name as ledmap.name
|
||||
} else { //WLEDMM add segment name as ledmap.name
|
||||
uint8_t segment_index = 0;
|
||||
for (segment &seg : _segments) {
|
||||
if (n == 10 + segment_index && !isFile && seg.name != nullptr) {
|
||||
@@ -2248,7 +2248,7 @@ bool WS2812FX::deserializeMap(uint8_t n) {
|
||||
|
||||
if (!isFile) {
|
||||
// erase custom mapping if selecting nonexistent ledmap.json (n==0)
|
||||
//WLEDM: doubt this is necessary as return false causes setupMatrix to deal with this !!!!
|
||||
//WLEDMM: doubt this is necessary as return false causes setupMatrix to deal with this !!!!
|
||||
if (!isMatrix && !n) {
|
||||
customMappingSize = 0;
|
||||
loadedLedmap = 0; //WLEDMM
|
||||
|
||||
Reference in New Issue
Block a user