some users have reported that releases after 0.14.0 are not working reliably. So we add a few "compat" for 8266 that try to reproduce the buildenv of 0.14.0 as much as possible. * platform and platform_packages from 0.14.0 * not using PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48 * due to smaller IRAM, we had to move some functions back from IRAM to normal flash (may cause slowdown)
This commit is contained in:
@@ -146,7 +146,7 @@ Segment& Segment::operator= (Segment &&orig) noexcept {
|
||||
}
|
||||
|
||||
// allocates effect data buffer on heap and initialises (erases) it
|
||||
bool IRAM_ATTR Segment::allocateData(size_t len) {
|
||||
bool IRAM_ATTR_YN Segment::allocateData(size_t len) {
|
||||
if (len == 0) return false; // nothing to do
|
||||
if (data && _dataLen >= len) { // already allocated enough (reduce fragmentation)
|
||||
if (call == 0) memset(data, 0, len); // erase buffer if called during effect initialisation
|
||||
@@ -170,7 +170,7 @@ bool IRAM_ATTR Segment::allocateData(size_t len) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void IRAM_ATTR Segment::deallocateData() {
|
||||
void IRAM_ATTR_YN Segment::deallocateData() {
|
||||
if (!data) { _dataLen = 0; return; }
|
||||
//DEBUG_PRINTF_P(PSTR("--- Released data (%p): %d/%d -> %p\n"), this, _dataLen, Segment::getUsedSegmentData(), data);
|
||||
if ((Segment::getUsedSegmentData() > 0) && (_dataLen > 0)) { // check that we don't have a dangling / inconsistent data pointer
|
||||
@@ -202,7 +202,7 @@ void Segment::resetIfRequired() {
|
||||
reset = false;
|
||||
}
|
||||
|
||||
CRGBPalette16 IRAM_ATTR &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) {
|
||||
CRGBPalette16 IRAM_ATTR_YN &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) {
|
||||
if (pal < 245 && pal > GRADIENT_PALETTE_COUNT+13) pal = 0;
|
||||
if (pal > 245 && (strip.customPalettes.size() == 0 || 255U-pal > strip.customPalettes.size()-1)) pal = 0; // TODO remove strip dependency by moving customPalettes out of strip
|
||||
//default palette. Differs depending on effect
|
||||
@@ -417,7 +417,7 @@ uint8_t IRAM_ATTR Segment::currentBri(bool useCct) const {
|
||||
return (useCct ? cct : (on ? opacity : 0));
|
||||
}
|
||||
|
||||
uint8_t IRAM_ATTR Segment::currentMode() const {
|
||||
uint8_t IRAM_ATTR_YN Segment::currentMode() const {
|
||||
#ifndef WLED_DISABLE_MODE_BLEND
|
||||
unsigned prog = progress();
|
||||
if (modeBlending && prog < 0xFFFFU) return _t->_modeT;
|
||||
@@ -425,7 +425,7 @@ uint8_t IRAM_ATTR Segment::currentMode() const {
|
||||
return mode;
|
||||
}
|
||||
|
||||
uint32_t IRAM_ATTR Segment::currentColor(uint8_t slot) const {
|
||||
uint32_t IRAM_ATTR_YN Segment::currentColor(uint8_t slot) const {
|
||||
if (slot >= NUM_COLORS) slot = 0;
|
||||
#ifndef WLED_DISABLE_MODE_BLEND
|
||||
return isInTransition() ? color_blend(_t->_segT._colorT[slot], colors[slot], progress(), true) : colors[slot];
|
||||
@@ -618,7 +618,7 @@ uint16_t IRAM_ATTR Segment::virtualHeight() const {
|
||||
return vHeight;
|
||||
}
|
||||
|
||||
uint16_t IRAM_ATTR Segment::nrOfVStrips() const {
|
||||
uint16_t IRAM_ATTR_YN Segment::nrOfVStrips() const {
|
||||
unsigned vLen = 1;
|
||||
#ifndef WLED_DISABLE_2D
|
||||
if (is2D()) {
|
||||
@@ -701,7 +701,7 @@ uint16_t IRAM_ATTR Segment::virtualLength() const {
|
||||
return vLength;
|
||||
}
|
||||
|
||||
void IRAM_ATTR Segment::setPixelColor(int i, uint32_t col)
|
||||
void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col)
|
||||
{
|
||||
if (!isActive()) return; // not active
|
||||
#ifndef WLED_DISABLE_2D
|
||||
@@ -895,7 +895,7 @@ void Segment::setPixelColor(float i, uint32_t col, bool aa)
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t IRAM_ATTR Segment::getPixelColor(int i) const
|
||||
uint32_t IRAM_ATTR_YN Segment::getPixelColor(int i) const
|
||||
{
|
||||
if (!isActive()) return 0; // not active
|
||||
#ifndef WLED_DISABLE_2D
|
||||
|
||||
Reference in New Issue
Block a user