Skip to content

Commit

Permalink
Merge branch 'master' into master-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek committed Mar 16, 2022
2 parents 18f575b + 522e752 commit aecfa3f
Show file tree
Hide file tree
Showing 15 changed files with 610 additions and 587 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## WLED changelog

### Builds after release 0.13.1

#### Build 2203160

- Version bump to v0.13.2-a0 "Toki"
- Add ability to skip up to 255 LEDs
- Dependency version bumps

### WLED release 0.13.1

#### Build 2203150
Expand Down
2 changes: 1 addition & 1 deletion 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.13.1-bl7",
"version": "0.13.2-bl0",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
7 changes: 3 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ upload_speed = 115200
lib_compat_mode = strict
lib_deps =
fastled/FastLED @ 3.5.0
IRremoteESP8266 @ 2.8.1
IRremoteESP8266 @ 2.8.2
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.4
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
#TFT_eSPI
Expand Down Expand Up @@ -200,10 +200,9 @@ build_flags =
lib_deps =
${env.lib_deps}
#https://github.com/lorol/LITTLEFS.git
ESPAsyncTCP @ 1.2.0
ESPAsyncTCP @ 1.2.2
ESPAsyncUDP
#makuna/NeoPixelBus @ 2.6.7 # 2.6.5/2.6.6 and newer do not compile on ESP core < 3.0.0
makuna/NeoPixelBus @ 2.6.9 # 2.6.5/2.6.6 and newer do not compile on ESP core < 3.0.0
makuna/NeoPixelBus @ 2.6.9

[esp32]
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip
Expand Down
7 changes: 5 additions & 2 deletions platformio_override.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ build_flags = ${common.build_flags_esp8266}
; -D DEFAULT_LED_COUNT=30
;
; set milliampere limit when using ESP pin to power leds
; -D ABL_MILLIAMPS_DEFAULT =850
; -D ABL_MILLIAMPS_DEFAULT=850
;
; 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
3 changes: 1 addition & 2 deletions wled00/FX.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
assuming each segment uses the same amount of data. 256 for ESP8266, 640 for ESP32. */
#define FAIR_DATA_PER_SEG (MAX_SEGMENT_DATA / MAX_NUM_SEGMENTS)

#define LED_SKIP_AMOUNT 1
#define MIN_SHOW_DELAY (_frametime < 16 ? 8 : 15)

#define NUM_COLORS 3 /* number of colors per segment */
Expand Down Expand Up @@ -609,7 +608,7 @@ class WS2812FX {
_brightness = DEFAULT_BRIGHTNESS;
currentPalette = CRGBPalette16(CRGB::Black);
targetPalette = CloudColors_p;
ablMilliampsMax = 850;
ablMilliampsMax = ABL_MILLIAMPS_DEFAULT;
currentMilliamps = 0;
timebase = 0;
resetSegments();
Expand Down
7 changes: 6 additions & 1 deletion wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
#define DEFAULT_LED_TYPE TYPE_WS2812_RGB
#endif

#ifndef DEFAULT_LED_COLOR_ORDER
#define DEFAULT_LED_COLOR_ORDER COL_ORDER_GRB //default to GRB
#endif


#if MAX_NUM_SEGMENTS < WLED_MAX_BUSSES
#error "Max segments must be at least max number of busses!"
#endif
Expand Down Expand Up @@ -87,7 +92,7 @@ void WS2812FX::finalizeInit(void)
uint16_t start = prevLen;
uint16_t count = defCounts[(i < defNumCounts) ? i : defNumCounts -1];
prevLen += count;
BusConfig defCfg = BusConfig(DEFAULT_LED_TYPE, defPin, start, count, COL_ORDER_GRB, 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);
busses.add(defCfg);
}
}
Expand Down
2 changes: 1 addition & 1 deletion wled00/bus_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ class BusManager {
//utility to get the approx. memory usage of a given BusConfig
static uint32_t memUsage(BusConfig &bc) {
uint8_t type = bc.type;
uint16_t len = bc.count;
uint16_t len = bc.count + bc.skipAmount;
if (type > 15 && type < 32) {
#ifdef ESP8266
if (bc.pins[0] == 3) { //8266 DMA uses 5x the mem
Expand Down
8 changes: 7 additions & 1 deletion wled00/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,13 @@
#endif
#endif

#define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit
#ifndef ABL_MILLIAMPS_DEFAULT
#define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit
#else
#if ABL_MILLIAMPS_DEFAULT < 250 // make sure value is at least 250
#define ABL_MILLIAMPS_DEFAULT 250
#endif
#endif

// PWM settings
#ifndef WLED_PWM_FREQ
Expand Down
12 changes: 7 additions & 5 deletions wled00/data/settings_leds.htm
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@
UI();
}
//returns mem usage
function getMem(t, len, p0) {
function getMem(t, n) {
let len = parseInt(d.getElementsByName("LC"+n)[0].value);
len += parseInt(d.getElementsByName("SL"+n)[0].value); // skipped LEDs are allocated too
if (t < 32) {
if (maxM < 10000 && p0==3) { //8266 DMA uses 5x the mem
if (maxM < 10000 && d.getElementsByName("L0"+n)[0].value == 3) { //8266 DMA uses 5x the mem
if (t > 29) return len*20; //RGBW
return len*15;
} else if (maxM >= 10000) //ESP32 RMT uses double buffer?
Expand Down Expand Up @@ -133,7 +135,7 @@
gId("p1d"+n).innerHTML = (t> 49 && t<64) ? "Clk GPIO:" : "";
var LK = d.getElementsByName("L1"+n)[0]; // clock pin

memu += getMem(t, d.getElementsByName("LC"+n)[0].value, d.getElementsByName("L0"+n)[0].value); // calc memory
memu += getMem(t, n); // calc memory

// enumerate pins
for (p=1; p<5; p++) {
Expand Down Expand Up @@ -325,7 +327,7 @@
<span id="p3d${i}"></span><input type="number" name="L3${i}" min="0" max="33" class="s" onchange="UI()"/>
<span id="p4d${i}"></span><input type="number" name="L4${i}" min="0" max="33" class="s" onchange="UI()"/>
<div id="dig${i}r" style="display:inline"><br><span id="rev${i}">Reversed</span>: <input type="checkbox" name="CV${i}"></div>
<div id="dig${i}s" style="display:inline"><br>Skip 1<sup>st</sup> LED: <input id="sl${i}" type="checkbox" name="SL${i}"></div>
<div id="dig${i}s" style="display:inline"><br>Skip first LEDs: <input type="number" name="SL${i}" min="0" max="255" oninput="UI()"></div>
<div id="dig${i}f" style="display:inline"><br>Off Refresh: <input id="rf${i}" type="checkbox" name="RF${i}"></div>
<div id="dig${i}a" style="display:inline"><br>Auto-calculate white channel from RGB:<br><select name="AW${i}"><option value=0>None</option><option value=1>Brighter</option><option value=2>Accurate</option><option value=3>Dual</option></select>&nbsp;</div>
</div>`;
Expand Down Expand Up @@ -468,7 +470,7 @@
d.getElementsByName("LS"+i)[0].value = v.start;
d.getElementsByName("LC"+i)[0].value = v.len;
d.getElementsByName("CO"+i)[0].value = v.order;
d.getElementsByName("SL"+i)[0].checked = v.skip;
d.getElementsByName("SL"+i)[0].value = v.skip;
d.getElementsByName("RF"+i)[0].checked = v.ref;
d.getElementsByName("CV"+i)[0].checked = v.rev;
});
Expand Down
Loading

0 comments on commit aecfa3f

Please sign in to comment.