Skip to content

Commit

Permalink
WLED 0.15.0-b4 release
Browse files Browse the repository at this point in the history
- LED settings update (limit to available outputs)
- minor fixes
  • Loading branch information
blazoncek committed Jun 29, 2024
1 parent e753f38 commit 0ff4016
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 71 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
## WLED changelog

#### Build 2405180

#### Build 2406290
- WLED 0.15.0-b4 release
- LED settings bus management update (WARNING only allow available outputs)
- Add ETH support for LILYGO-POE-Pro (#4030 by @rorosaurus)
- Update usermod_sn_photoresistor (#4017 by @xkvmoto)
- Several internal fixes and optimisations
- move LED_BUILTIN handling to BusManager class
- reduce max panels (web server limitation)
- edit WiFi TX power (ESP32)
- keep current ledmap ID in UI
- limit outputs in UI based on length
- wifi.ap addition to JSON Info (JSON API)
- relay pin init bugfix
- file editor button in UI
- ESP8266: update was restarting device on some occasions
- a bit of throttling in UI (for ESP8266)

#### Build 2406120
- Update NeoPixelBus to v2.8.0
- Increased LED outputs one ESP32 using parallel I2S (up to 17)
- use single/mono I2S + 4x RMT for 5 outputs or less
- use parallel x8 I2S + 8x RMT for >5 outputs (limit of 300 LEDs per output)
- Fixed code of Smartnest and updated documentation (#4001 by @DevilPro1)
- ESP32-S3 WiFi fix (#4010 by @cstruck)
- TetrisAI usermod fix (#3897 by @muebau)
- ESP-NOW usermod hook
- Update wled.h regarding OTA Password (#3993 by @gsieben)
- Usermod BME68X Sensor Implementation (#3994 by @gsieben)
- Add a usermod for AHT10, AHT15 and AHT20 temperature/humidity sensors (#3977 by @LordMike)
- Update Battery usermod documentation (#3968 by @adamsthws)
- Add INA226 usermod for reading current and power over i2c (#3986 by @LordMike)
- Bugfixes: #3991
- Several internal fixes and optimisations (WARNING: some effects may be broken that rely on overflow/narrow width)
- replace uint8_t and uint16_t with unsigned
- replace in8_t and int16_t with int
- reduces code by 1kB

#### Build 2405180
- Official 0.15.0-b3 release
- Merge 0.14.3 fixes
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.15.0-b3",
"version": "0.15.0-b4",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
29 changes: 20 additions & 9 deletions platformio_override.sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ default_envs = WLED_tasmota_1M # define as many as you need
#----------
# SAMPLE
#----------
[env:WLED_tasmota_1M]
[env:WLED_generic8266_1M]
extends = env:esp01_1m_full # when you want to extend the existing environment (define only updated options)
; board = esp01_1m # uncomment when ou need different board
; platform = ${common.platform_wled_default} # uncomment and change when you want particular platform
Expand All @@ -26,9 +26,9 @@ lib_deps = ${esp8266.lib_deps}
; adafruit/Adafruit BME280 Library@^2.2.2
; Wire
; robtillaart/SHT85@~0.3.3
; gmag11/QuickESPNow ;@ 0.6.2
; ;gmag11/QuickESPNow @ ~0.7.0 # will also load QuickDebug
; https://github.com/blazoncek/QuickESPNow.git#optional-debug ;; exludes debug library
; https://github.com/kosme/arduinoFFT#develop @ 2.0.1 ;; used for USERMOD_AUDIOREACTIVE
; ${esp32.AR_lib_deps} ;; used for USERMOD_AUDIOREACTIVE
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
;
Expand All @@ -51,6 +51,11 @@ build_flags = ${common.build_flags} ${esp8266.build_flags}
; -D WLED_DISABLE_ESPNOW
; -D WLED_DISABLE_BROWNOUT_DET
;
; enable optional built-in features
; -D WLED_ENABLE_PIXART
; -D WLED_ENABLE_USERMOD_PAGE # if created
; -D WLED_ENABLE_DMX
;
; PIN defines - uncomment and change, if needed:
; -D LEDPIN=2
; or use this for multiple outputs
Expand All @@ -64,6 +69,8 @@ build_flags = ${common.build_flags} ${esp8266.build_flags}
;
; Limit max buses
; -D WLED_MAX_BUSSES=2
; -D WLED_MAX_ANALOG_CHANNELS=3 # only 3 PWM HW pins available
; -D WLED_MAX_DIGITAL_CHANNELS=2 # only 2 HW accelerated pins available
;
; Configure default WiFi
; -D CLIENT_SSID='"MyNetwork"'
Expand Down Expand Up @@ -128,12 +135,12 @@ build_flags = ${common.build_flags} ${esp8266.build_flags}
;
; Use PIR sensor usermod and configure it to use GPIO4 and timer of 60s
; -D USERMOD_PIRSWITCH
; -D PIR_SENSOR_PIN=4
; -D PIR_SENSOR_PIN=4 # use -1 to disable usermod
; -D PIR_SENSOR_OFF_SEC=60
; -D PIR_SENSOR_MAX_SENSORS=2 # max allowable sensors (uses OR logic for triggering)
;
; Use Audioreactive usermod and configure I2S microphone
; -D USERMOD_AUDIOREACTIVE
; -D UM_AUDIOREACTIVE_USE_NEW_FFT
; -D AUDIOPIN=-1
; -D DMTYPE=1 # 0-analog/disabled, 1-I2S generic, 2-ES7243, 3-SPH0645, 4-I2S+mclk, 5-I2S PDM
; -D I2S_SDPIN=36
Expand All @@ -155,18 +162,22 @@ build_flags = ${common.build_flags} ${esp8266.build_flags}
; -D DEFAULT_LED_COUNT=30
; or this for multiple outputs
; -D PIXEL_COUNTS=30,30
;
; set milliampere limit when using ESP pin to power leds
;
; set the default LED type
; -D DEFAULT_LED_TYPE=22 # see const.h (TYPE_xxxx)
;
; set milliampere limit when using ESP power pin (or inadequate PSU) to power LEDs
; -D ABL_MILLIAMPS_DEFAULT=850
; -D LED_MILLIAMPS_DEFAULT=55
;
; enable IR by setting remote type
; -D IRTYPE=0 ;0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote
; -D IRTYPE=0 # 0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote
;
; set default color order of your led strip
; -D DEFAULT_LED_COLOR_ORDER=COL_ORDER_GRB
;
; use PSRAM on classic ESP32 rev.1 (rev.3 or above has no issues)
; -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
; -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue # needed only for classic ESP32 rev.1
;
; configure I2C and SPI interface (for various hardware)
; -D I2CSDAPIN=33 # initialise interface
Expand Down
4 changes: 4 additions & 0 deletions usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ class PIRsensorSwitch : public Usermod
bool sensorPinState[PIR_SENSOR_MAX_SENSORS] = {LOW}; // current PIR sensor pin state

// configurable parameters
#if PIR_SENSOR_PIN < 0
bool enabled = false; // PIR sensor disabled
#else
bool enabled = true; // PIR sensor enabled
#endif
int8_t PIRsensorPin[PIR_SENSOR_MAX_SENSORS] = {PIR_SENSOR_PIN}; // PIR sensor pin
uint32_t m_switchOffDelay = PIR_SENSOR_OFF_SEC*1000; // delay before switch off after the sensor state goes LOW (10min)
uint8_t m_onPreset = 0; // on preset
Expand Down
4 changes: 2 additions & 2 deletions usermods/usermod_v2_auto_save/usermod_v2_auto_save.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ class AutoSaveUsermod : public Usermod {
* Da loop.
*/
void loop() {
if (!autoSaveAfterSec || !enabled || strip.isUpdating() || currentPreset>0) return; // setting 0 as autosave seconds disables autosave

static unsigned long lastRun = 0;
unsigned long now = millis();
if (!autoSaveAfterSec || !enabled || currentPreset>0 || (strip.isUpdating() && now - lastRun < 240)) return; // setting 0 as autosave seconds disables autosave
uint8_t currentMode = strip.getMainSegment().mode;
uint8_t currentPalette = strip.getMainSegment().palette;

Expand Down
2 changes: 1 addition & 1 deletion wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ void WS2812FX::finalizeInit(void) {
unsigned start = prevLen;
unsigned count = defCounts[(i < defNumCounts) ? i : defNumCounts -1];
prevLen += count;
BusConfig defCfg = BusConfig(DEFAULT_LED_TYPE, defPin, start, count, DEFAULT_LED_COLOR_ORDER, false, 0, RGBW_MODE_MANUAL_ONLY);
BusConfig defCfg = BusConfig(DEFAULT_LED_TYPE, defPin, start, count, DEFAULT_LED_COLOR_ORDER, false, 0, RGBW_MODE_MANUAL_ONLY, 0, useGlobalLedBuffer);
if (BusManager::add(defCfg) == -1) break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions wled00/bus_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct BusConfig {
uint8_t milliAmpsPerLed;
uint16_t milliAmpsMax;

BusConfig(uint8_t busType, uint8_t* ppins, uint16_t pstart, uint16_t len = 1, uint8_t pcolorOrder = COL_ORDER_GRB, bool rev = false, uint8_t skip = 0, byte aw=RGBW_MODE_MANUAL_ONLY, uint16_t clock_kHz=0U, bool dblBfr=false, uint8_t maPerLed=55, uint16_t maMax=ABL_MILLIAMPS_DEFAULT)
BusConfig(uint8_t busType, uint8_t* ppins, uint16_t pstart, uint16_t len = 1, uint8_t pcolorOrder = COL_ORDER_GRB, bool rev = false, uint8_t skip = 0, byte aw=RGBW_MODE_MANUAL_ONLY, uint16_t clock_kHz=0U, bool dblBfr=false, uint8_t maPerLed=LED_MILLIAMPS_DEFAULT, uint16_t maMax=ABL_MILLIAMPS_DEFAULT)
: count(len)
, start(pstart)
, colorOrder(pcolorOrder)
Expand Down Expand Up @@ -129,7 +129,7 @@ class Bus {
virtual uint32_t getPixelColor(uint16_t pix) { return 0; }
virtual void setBrightness(uint8_t b) { _bri = b; };
virtual uint8_t getPins(uint8_t* pinArray) { return 0; }
virtual uint16_t getLength() { return _len; }
virtual uint16_t getLength() { return isOk() ? _len : 0; }
virtual void setColorOrder(uint8_t co) {}
virtual uint8_t getColorOrder() { return COL_ORDER_RGB; }
virtual uint8_t skippedLeds() { return 0; }
Expand Down
52 changes: 42 additions & 10 deletions wled00/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,58 @@

#ifndef WLED_MAX_BUSSES
#ifdef ESP8266
#define WLED_MAX_BUSSES 3
#define WLED_MAX_DIGITAL_CHANNELS 3
#define WLED_MAX_ANALOG_CHANNELS 5
#define WLED_MAX_BUSSES 4 // will allow 3 digital & 1 analog RGB
#define WLED_MIN_VIRTUAL_BUSSES 2
#else
#if defined(CONFIG_IDF_TARGET_ESP32C3) // 2 RMT, 6 LEDC, only has 1 I2S but NPB does not support it ATM
#define WLED_MAX_BUSSES 3 // will allow 2 digital & 1 analog (or the other way around)
#define WLED_MAX_BUSSES 4 // will allow 2 digital & 2 analog RGB
#define WLED_MAX_DIGITAL_CHANNELS 2
#define WLED_MAX_ANALOG_CHANNELS 6
#define WLED_MIN_VIRTUAL_BUSSES 3
#elif defined(CONFIG_IDF_TARGET_ESP32S2) // 4 RMT, 8 LEDC, only has 1 I2S bus, supported in NPB
// the 5th bus (I2S) will prevent Audioreactive usermod from functioning (it is last used though)
#define WLED_MAX_BUSSES 7 // will allow 5 digital & 2 analog
#define WLED_MAX_BUSSES 7 // will allow 5 digital & 2 analog RGB
#define WLED_MAX_DIGITAL_CHANNELS 5
#define WLED_MAX_ANALOG_CHANNELS 8
#define WLED_MIN_VIRTUAL_BUSSES 3
#elif defined(CONFIG_IDF_TARGET_ESP32S3) // 4 RMT, 8 LEDC, has 2 I2S but NPB does not support them ATM
#define WLED_MAX_BUSSES 6 // will allow 4 digital & 2 analog
#define WLED_MAX_BUSSES 6 // will allow 4 digital & 2 analog RGB
#define WLED_MAX_DIGITAL_CHANNELS 4
#define WLED_MAX_ANALOG_CHANNELS 8
#define WLED_MIN_VIRTUAL_BUSSES 4
#else
// the last digital bus (I2S0) will prevent Audioreactive usermod from functioning
#define WLED_MAX_BUSSES 17
#define WLED_MIN_VIRTUAL_BUSSES 0
#define WLED_MAX_BUSSES 20 // will allow 17 digital & 3 analog RGB
#define WLED_MAX_DIGITAL_CHANNELS 17
#define WLED_MAX_ANALOG_CHANNELS 10
#define WLED_MIN_VIRTUAL_BUSSES 4
#endif
#endif
#else
#ifdef ESP8266
#if WLED_MAX_BUSES > 5
#if WLED_MAX_BUSSES > 5
#error Maximum number of buses is 5.
#endif
#ifndef WLED_MAX_ANALOG_CHANNELS
#error You must also define WLED_MAX_ANALOG_CHANNELS.
#endif
#ifndef WLED_MAX_DIGITAL_CHANNELS
#error You must also define WLED_MAX_DIGITAL_CHANNELS.
#endif
#define WLED_MIN_VIRTUAL_BUSSES (5-WLED_MAX_BUSSES)
#else
#if WLED_MAX_BUSES > 17
#error Maximum number of buses is 17.
#if WLED_MAX_BUSSES > 20
#error Maximum number of buses is 20.
#endif
#ifndef WLED_MAX_ANALOG_CHANNELS
#error You must also define WLED_MAX_ANALOG_CHANNELS.
#endif
#ifndef WLED_MAX_DIGITAL_CHANNELS
#error You must also define WLED_MAX_DIGITAL_CHANNELS.
#endif
#define WLED_MIN_VIRTUAL_BUSSES (17-WLED_MAX_BUSSES)
#define WLED_MIN_VIRTUAL_BUSSES (20-WLED_MAX_BUSSES)
#endif
#endif

Expand Down Expand Up @@ -480,6 +502,16 @@
#endif
#endif

#ifndef LED_MILLIAMPS_DEFAULT
#define LED_MILLIAMPS_DEFAULT 55 // common WS2812B
#else
#if LED_MILLIAMPS_DEFAULT < 1 || LED_MILLIAMPS_DEFAULT > 100
#warning "Unusual LED mA current, overriding with default value."
#undef LED_MILLIAMPS_DEFAULT
#define LED_MILLIAMPS_DEFAULT 55
#endif
#endif

// PWM settings
#ifndef WLED_PWM_FREQ
#ifdef ESP8266
Expand Down
8 changes: 5 additions & 3 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2794,8 +2794,9 @@ function getPalettesData(page, callback)
return res.json();
})
.then(json => {
retry = false;
palettesData = Object.assign({}, palettesData, json.p);
if (page < json.m) setTimeout(()=>{ getPalettesData(page + 1, callback); }, 50);
if (page < json.m) setTimeout(()=>{ getPalettesData(page + 1, callback); }, 75);
else callback();
})
.catch((error)=>{
Expand Down Expand Up @@ -2835,7 +2836,8 @@ function search(field, listId = null) {
if (gId("filters").querySelectorAll("input[type=checkbox]:checked").length) return;

// filter list items but leave (Default & Solid) always visible
gId(listId).querySelectorAll('.lstI').forEach((listItem,i)=>{
const listItems = gId("fxlist").querySelectorAll('.lstI');
listItems.forEach((listItem,i)=>{
if (listId!=='pcont' && i===0) return;
const listItemName = listItem.querySelector('.lstIname').innerText.toUpperCase();
const searchIndex = listItemName.indexOf(field.value.toUpperCase());
Expand Down Expand Up @@ -3058,7 +3060,7 @@ function size()

function togglePcMode(fromB = false)
{
let ap = (fromB && !lastinfo) || (lastinfo && lastinfo.wifi && lastinfo.witi.ap);
let ap = (fromB && !lastinfo) || (lastinfo && lastinfo.wifi && lastinfo.wifi.ap);
if (fromB) {
pcModeA = !pcModeA;
localStorage.setItem('pcm', pcModeA);
Expand Down
Loading

0 comments on commit 0ff4016

Please sign in to comment.