From 6cd07c221655fe0e4fa610b540508ac4b99d7b4b Mon Sep 17 00:00:00 2001 From: Ewoud Date: Tue, 17 Jan 2023 17:54:14 +0100 Subject: [PATCH] esp8266_4MB_min - 160Mhz (instead of 80) ;-) + small things --- platformio.ini | 2 ++ .../usermod_v2_four_line_display_ALT.h | 2 +- wled00/FX.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index a5b86642..a9563b8e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -806,6 +806,7 @@ board_build.partitions = ${Board_ESP32_16MB.board_build.partitions} [env:esp8266_4MB_min] extends = env:d1_mini upload_speed = 460800 ;115200 +board_build.f_cpu = 160000000L ;; we want 160Mhz (default = 80Mhz) build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=esp8266_4MB_min -D WLED_DISABLE_ALEXA @@ -842,6 +843,7 @@ build_flags = ${common.build_flags_esp8266} ; monitor_filters = esp8266_exception_decoder lib_deps = ${esp8266.lib_deps} OneWire@~2.3.5 ; used for USERMOD_FOUR_LINE_DISPLAY and USERMOD_DALLASTEMPERATURE + ; olikraus/U8g2 @ ^2.28.8 ; used for USERMOD_FOUR_LINE_DISPLAY ; olikraus/U8g2@ ^2.34.5 ; used for USERMOD_FOUR_LINE_DISPLAY -> need newer version with bugfixes for arduino-esp32 v2.0.4 (Wire inititialization) ElectronicCats/MPU6050 @ 0.6.0 ; used for USERMOD_MPU6050_IMU ; RAM: [====== ] 61.5% (used 50344 bytes from 81920 bytes) diff --git a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h index 21219663..91403bc4 100644 --- a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h +++ b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h @@ -1185,7 +1185,7 @@ class FourLineDisplayUsermod : public Usermod { bool pinsChanged = false; for (byte i=0; i<5; i++) if (ioPin[i] != oldPin[i]) { pinsChanged = true; break; } if (pinsChanged || type!=newType) { - if (type != NONE) delete u8x8; + if (typeOK) delete u8x8; PinOwner po = PinOwner::UM_FourLineDisplay; bool isSPI = (type == SSD1306_SPI || type == SSD1306_SPI64); if (isSPI) { diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 5a5ccac0..2a952981 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -4870,7 +4870,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https: for (int y = 0; y < rows; y++) for (int x = 0; x < cols; x++) prevLeds[XY(x,y)] = CRGB::Black; memset(crcBuffer, 0, sizeof(uint16_t)*crcBufferLen); - } else if (strip.now - SEGENV.step < FRAMETIME_FIXED * map(SEGMENT.speed,0,255,64,4)) { + } else if (strip.now - SEGENV.step < FRAMETIME_FIXED * (uint32_t)map(SEGMENT.speed,0,255,64,4)) { //WLEDMM (uint32_t) surpresses warning // update only when appropriate time passes (in 42 FPS slots) return FRAMETIME; }