0.12 beta

This commit is contained in:
cschwinne 2021-03-20 18:43:05 +01:00
parent eee2450c9e
commit 8a2256e0d8
20 changed files with 2134 additions and 2225 deletions

View File

@ -1,6 +1,6 @@
name: PlatformIO CI
on: [push]
on: [push, pull_request]
jobs:
build:

View File

@ -2,6 +2,17 @@
### Development versions after 0.11.1 release
#### Build 2103200
- Version bump to 0.12.0-b0 "Hikari"
- Added palette preview and search (PR #1637)
- Added Reverse checkbox for PWM busses - reverses logic level for on
- Fixed various problems with the Playlist feature (PR #1724)
- Replaced "Layer" icon with "i" icon for Info button
- Chunchun effect more fitting for various segment lengths (PR #1804)
- Removed global reverse (in favor of individual bus reverse)
- Removed some unused icons from UI icon font
#### Build 2103130
- Added options for Auto Node discovery

View File

@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.12.0-a0",
"version": "0.12.0-b0",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {

View File

@ -12,7 +12,7 @@
default_envs = travis_esp8266, travis_esp32
# Release binaries
; default_envs = nodemcuv2, esp01_1m_full, esp32dev
; default_envs = nodemcuv2, esp01_1m_full, esp32dev, esp32_eth
# Single binaries (uncomment your board)
; default_envs = nodemcuv2

View File

@ -609,7 +609,6 @@ class WS2812FX {
setPixelSegment(uint8_t n);
bool
reverseMode = false, //is the entire LED strip reversed?
gammaCorrectBri = false,
gammaCorrectCol = true,
applyToAllSelected = true,

View File

@ -145,8 +145,6 @@ void WS2812FX::setPixelColor(uint16_t n, uint32_t c) {
setPixelColor(n, r, g, b, w);
}
#define REV(i) (_length - 1 - (i))
//used to map from segment index to physical pixel, taking into account grouping, offsets, reverse and mirroring
uint16_t WS2812FX::realPixelIndex(uint16_t i) {
int16_t iGroup = i * SEGMENT.groupLength();
@ -162,8 +160,6 @@ uint16_t WS2812FX::realPixelIndex(uint16_t i) {
}
realIndex += SEGMENT.start;
/* Reverse the whole string */
if (reverseMode) realIndex = REV(realIndex);
return realIndex;
}
@ -197,27 +193,22 @@ void WS2812FX::setPixelColor(uint16_t i, byte r, byte g, byte b, byte w)
uint32_t col = ((w << 24) | (r << 16) | (g << 8) | (b));
/* Set all the pixels in the group, ensuring _skipFirstMode is honored */
bool reversed = reverseMode ^ IS_REVERSE;
bool reversed = IS_REVERSE;
uint16_t realIndex = realPixelIndex(i);
for (uint16_t j = 0; j < SEGMENT.grouping; j++) {
int16_t indexSet = realIndex + (reversed ? -j : j);
int16_t indexSetRev = indexSet;
if (reverseMode) indexSetRev = REV(indexSet);
if (indexSet < customMappingSize) indexSet = customMappingTable[indexSet];
if (indexSetRev >= SEGMENT.start && indexSetRev < SEGMENT.stop) {
if (indexSet >= SEGMENT.start && indexSet < SEGMENT.stop) {
busses.setPixelColor(indexSet + skip, col);
if (IS_MIRROR) { //set the corresponding mirrored pixel
if (reverseMode) {
busses.setPixelColor(REV(SEGMENT.start) - indexSet + skip + REV(SEGMENT.stop) + 1, col);
} else {
busses.setPixelColor(SEGMENT.stop - indexSet + skip + SEGMENT.start - 1, col);
}
uint16_t indexMir = SEGMENT.stop - indexSet + SEGMENT.start - 1;
if (indexMir < customMappingSize) indexMir = customMappingTable[indexMir];
busses.setPixelColor(indexMir + skip, col);
}
}
}
} else { //live data, etc.
if (reverseMode) i = REV(i);
if (i < customMappingSize) i = customMappingTable[i];
uint32_t col = ((w << 24) | (r << 16) | (g << 8) | (b));

View File

@ -212,6 +212,7 @@ class BusPwm : public Bus {
ledcAttachPin(_pins[i], _ledcStart + i);
#endif
}
reversed = bc.reversed;
_valid = true;
};
@ -245,6 +246,7 @@ class BusPwm : public Bus {
uint8_t numPins = NUM_PWM_PINS(_type);
for (uint8_t i = 0; i < numPins; i++) {
uint8_t scaled = (_data[i] * _bri) / 255;
if (reversed) scaled = 255 - scaled;
#ifdef ESP8266
analogWrite(_pins[i], scaled);
#else

View File

@ -95,7 +95,6 @@ void deserializeConfig() {
CJSON(strip.ablMilliampsMax, hw_led[F("maxpwr")]);
CJSON(strip.milliampsPerLed, hw_led[F("ledma")]);
CJSON(strip.reverseMode, hw_led["rev"]);
CJSON(strip.rgbwMode, hw_led[F("rgbwm")]);
JsonArray ins = hw_led["ins"];
@ -135,6 +134,7 @@ void deserializeConfig() {
if (mem <= MAX_LED_MEMORY) busses.add(bc);
}
strip.finalizeInit(useRGBW, ledCount, skipFirstLed);
if (hw_led["rev"]) busses.getBus(0)->reversed = true; //set 0.11 global reversed setting for first bus
JsonObject hw_btn_ins_0 = hw[F("btn")][F("ins")][0];
CJSON(buttonEnabled, hw_btn_ins_0["type"]);
@ -450,7 +450,6 @@ void serializeConfig() {
hw_led[F("total")] = ledCount;
hw_led[F("maxpwr")] = strip.ablMilliampsMax;
hw_led[F("ledma")] = strip.milliampsPerLed;
hw_led["rev"] = strip.reverseMode;
hw_led[F("rgbwm")] = strip.rgbwMode;
JsonArray hw_led_ins = hw_led.createNestedArray("ins");

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@
<button id="buttonNl" onclick="toggleNl()"><i class="icons">&#xe2a2;</i><p class="tab-label">Timer</p></button>
<button id="buttonSync" onclick="toggleSync()"><i class="icons">&#xe116;</i><p class="tab-label">Sync</p></button>
<button id="buttonSr" onclick="toggleLiveview()"><i class="icons">&#xe410;</i><p class="tab-label">Peek</p></button>
<button id="buttonI" onclick="toggleInfo()"><i class="icons">&#xe34b;</i><p class="tab-label">Info</p></button>
<button id="buttonI" onclick="toggleInfo()"><i class="icons">&#xe066;</i><p class="tab-label">Info</p></button>
<button id="buttonNodes" onclick="toggleNodes()"><i class="icons">&#xe22d;</i><p class="tab-label">Nodes</p></button></div>
<button onclick="window.location.href = '/settings';"><i class="icons">&#xe0a2;</i><p class="tab-label">Config</p></button>
<button id="buttonPcm" onclick="togglePcMode(true)"><i class="icons">&#xe23d;</i><p class="tab-label">PC Mode</p></button>

View File

@ -230,8 +230,8 @@
<br>
<span id="psd${i}">Start:</span> <input type="number" name="LS${i}" min="0" max="8191" value="${lastEnd(i)}" required />&nbsp;
<div id="dig${i}" style="display:inline">
Count: <input type="number" name="LC${i}" min="0" max="${maxPB}" value="1" required oninput="UI()" /><br>
Reverse: <input type="checkbox" name="CV${i}"></div><br>
Count: <input type="number" name="LC${i}" min="0" max="${maxPB}" value="1" required oninput="UI()" /><br></div>
Reverse: <input type="checkbox" name="CV${i}"><br>
</div>`;
f.insertAdjacentHTML("beforeend", cn);
}
@ -333,7 +333,6 @@
<option value="2">Linear (never wrap)</option>
<option value="3">None (not recommended)</option>
</select><br>
Reverse LED order (rotate 180): <input type="checkbox" name="RV"><br>
Skip first LED: <input type="checkbox" name="SL"><br>
<span class="wc">
Auto-calculate white channel from RGB:<br>

View File

@ -42,7 +42,7 @@ function B(){window.history.back()}function U(){document.getElementById("uf").st
.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}#msg{display:none}
</style></head><body><h2>WLED Software Update</h2><form method="POST"
action="/update" id="uf" enctype="multipart/form-data" onsubmit="U()">
Installed version: 0.12.0-a0<br>Download the latest binary: <a
Installed version: 0.12.0-b0<br>Download the latest binary: <a
href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img
src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square">
</a><br><input type="file" class="bt" name="update" accept=".bin" required><br>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -194,7 +194,7 @@ bool deserializeState(JsonObject root)
JsonObject nl = root["nl"];
nightlightActive = nl["on"] | nightlightActive;
nightlightDelayMins = nl[F("dur")] | nightlightDelayMins;
nightlightMode = nl[F("fade")] | nightlightMode; //deprecated, remove for v0.12.0
nightlightMode = nl[F("fade")] | nightlightMode; //deprecated, remove for v0.13.0
nightlightMode = nl[F("mode")] | nightlightMode;
nightlightTargetBri = nl[F("tbri")] | nightlightTargetBri;

View File

@ -183,7 +183,6 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
t = request->arg(F("PB")).toInt();
if (t >= 0 && t < 4) strip.paletteBlend = t;
strip.reverseMode = request->hasArg(F("RV"));
skipFirstLed = request->hasArg(F("SL"));
t = request->arg(F("BF")).toInt();
if (t > 0) briMultiplier = t;

View File

@ -217,21 +217,6 @@ void WLED::loop()
handleHue();
handleBlynk();
//LED settings have been saved, re-init busses
if (busConfigs[0] != nullptr) {
busses.removeAll();
uint32_t mem = 0;
for (uint8_t i = 0; i < WLED_MAX_BUSSES; i++) {
if (busConfigs[i] == nullptr) break;
mem += busses.memUsage(*busConfigs[i]);
if (mem <= MAX_LED_MEMORY) busses.add(*busConfigs[i]);
delete busConfigs[i]; busConfigs[i] = nullptr;
}
strip.finalizeInit(useRGBW, ledCount, skipFirstLed);
yield();
serializeConfig();
}
yield();
if (!offMode)
@ -250,7 +235,24 @@ void WLED::loop()
initMqtt();
refreshNodeList();
if (nodeBroadcastEnabled) sendSysInfoUDP();
yield();
}
//LED settings have been saved, re-init busses
if (busConfigs[0] != nullptr) {
busses.removeAll();
uint32_t mem = 0;
for (uint8_t i = 0; i < WLED_MAX_BUSSES; i++) {
if (busConfigs[i] == nullptr) break;
mem += busses.memUsage(*busConfigs[i]);
if (mem <= MAX_LED_MEMORY) busses.add(*busConfigs[i]);
delete busConfigs[i]; busConfigs[i] = nullptr;
}
strip.finalizeInit(useRGBW, ledCount, skipFirstLed);
yield();
serializeConfig();
}
yield();
handleWs();
handleStatusLED();

View File

@ -3,12 +3,12 @@
/*
Main sketch, global variable declarations
@title WLED project sketch
@version 0.12.0-a0
@version 0.12.0-b0
@author Christian Schwinne
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2103130
#define VERSION 2103200
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG
@ -179,7 +179,7 @@
#endif
// Global Variable definitions
WLED_GLOBAL char versionString[] _INIT("0.12.0-a0");
WLED_GLOBAL char versionString[] _INIT("0.12.0-b0");
#define WLED_CODENAME "Hikari"
// AP and OTA default passwords (for maximum security change them!)

View File

@ -115,7 +115,6 @@ void loadSettingsFromEEPROM()
}
receiveNotificationBrightness = EEPROM.read(250);
fadeTransition = EEPROM.read(251);
strip.reverseMode = EEPROM.read(252);
transitionDelayDefault = EEPROM.read(253) + ((EEPROM.read(254) << 8) & 0xFF00);
transitionDelay = transitionDelayDefault;
briMultiplier = EEPROM.read(255);

View File

@ -335,7 +335,6 @@ void getSettingsJS(byte subPage, char* dest)
sappend('v',SET_F("TL"),nightlightDelayMinsDefault);
sappend('v',SET_F("TW"),nightlightMode);
sappend('i',SET_F("PB"),strip.paletteBlend);
sappend('c',SET_F("RV"),strip.reverseMode);
sappend('c',SET_F("SL"),skipFirstLed);
sappend('v',SET_F("RL"),rlyPin);
sappend('c',SET_F("RM"),rlyMde);