Skip to content

Commit 6a8ed11

Browse files
committed
Accept hex color strings in individual LED API
Version bump to 0.13.0-b2 "Toki" Fixed transition property not applying unless power/bri/color changed next Moved transition field below segments (temporarily)
1 parent 0862859 commit 6a8ed11

File tree

12 files changed

+2221
-2211
lines changed

12 files changed

+2221
-2211
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wled",
3-
"version": "0.13.0-b1",
3+
"version": "0.13.0-b2",
44
"description": "Tools for WLED project",
55
"main": "tools/cdata.js",
66
"directories": {

pio-scripts/output_bins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def bin_rename_copy(source, target, env):
3232

3333
release_name = _get_cpp_define_value(env, "WLED_RELEASE_NAME")
3434

35-
if release_name and os.getenv("WLED_RELEASE"):
35+
if release_name:
3636
_create_dirs(["release"])
3737
version = _get_cpp_define_value(env, "WLED_VERSION")
3838
release_file = "{}release{}WLED_{}_{}.bin".format(OUTPUT_DIR, os.path.sep, version, release_name)

wled00/cfg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
236236
JsonObject if_sync_recv = if_sync["recv"];
237237
CJSON(receiveNotificationBrightness, if_sync_recv["bri"]);
238238
CJSON(receiveNotificationColor, if_sync_recv["col"]);
239-
CJSON(receiveNotificationEffects, if_sync_recv[F("fx")]);
239+
CJSON(receiveNotificationEffects, if_sync_recv["fx"]);
240240
//! following line might be a problem if called after boot
241241
receiveNotifications = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects);
242242

wled00/data/index.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,9 @@ input[type=range]:active + .sliderbubble {
612612
margin-top: 5px;
613613
display: none;
614614
}
615+
#tt {
616+
text-align: center;
617+
}
615618

616619
.cl {
617620
width: 42px;
@@ -653,7 +656,7 @@ input[type=number], input[type=text] {
653656
background: var(--c-3);
654657
color: var(--c-f);
655658
border: 0px solid white;
656-
border-radius: 5px;
659+
border-radius: 25px;
657660
padding: 8px;
658661
margin: 6px 6px 6px 0;
659662
font-size: 19px;
@@ -683,7 +686,6 @@ textarea {
683686

684687
input[type=text] {
685688
width: 100px;
686-
border-radius: 25px;
687689
text-align: center;
688690
}
689691

@@ -706,7 +708,6 @@ input[type=number]::-webkit-outer-spin-button {
706708
}
707709

708710
.pln {
709-
border-radius: 25px !important;
710711
width: 67px !important;
711712
margin: 0 2px 8px 0 !important;
712713
text-align: center;
@@ -723,6 +724,7 @@ input[type=number]::-webkit-outer-spin-button {
723724
}
724725

725726
.segn {
727+
border-radius: 5px !important;
726728
margin: 3px 0 6px 0 !important;
727729
}
728730

wled00/data/index.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
<div id="segutil2">
154154
<button class="btn btn-s" id="rsbtn" onclick="rSegs()">Reset segments</button>
155155
</div>
156+
<p>Transition: <input id="tt" class="noslide" type="number" min="0" max="65.5" step="0.1" value="0.7">s</p>
156157
</div>
157158

158159
<div id="Favorites" class="tabcontent">
@@ -164,8 +165,7 @@
164165
</div>
165166
<div id="pcont">
166167
Loading...
167-
</div><br>
168-
Transition <input id="tt" class="noslide" type="number" min="0" max="65.5" step="0.1" value="0.7">s
168+
</div>
169169
</div>
170170
</div>
171171

wled00/data/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,11 @@ function requestJson(command, rinfo = true) {
10621062
{
10631063
command.v = true; //get complete API response
10641064
command.time = Math.floor(Date.now() / 1000);
1065+
var t = d.getElementById('tt');
1066+
if (t.validity.valid) {
1067+
var tn = parseInt(t.value*10);
1068+
if (tn != tr) command.transition = tn;
1069+
}
10651070
req = JSON.stringify(command);
10661071
if (req.length > 1000) useWs = false; //do not send very long requests over websocket
10671072
}
@@ -1156,7 +1161,6 @@ function requestJson(command, rinfo = true) {
11561161
function togglePower() {
11571162
isOn = !isOn;
11581163
var obj = {"on": isOn};
1159-
obj.transition = parseInt(d.getElementById('tt').value*10);
11601164
requestJson(obj);
11611165
}
11621166

@@ -1543,7 +1547,6 @@ function setPalette(paletteId = null)
15431547

15441548
function setBri() {
15451549
var obj = {"bri": parseInt(d.getElementById('sliderBri').value)};
1546-
obj.transition = parseInt(d.getElementById('tt').value*10);
15471550
requestJson(obj);
15481551
}
15491552

@@ -1756,7 +1759,6 @@ function setColor(sr) {
17561759
}
17571760
updateHex();
17581761
updateRgb();
1759-
obj.transition = parseInt(d.getElementById('tt').value*10);
17601762
requestJson(obj);
17611763
}
17621764

wled00/html_other.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function B(){window.history.back()}function U(){document.getElementById("uf").st
4242
.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}
4343
</style></head><body><h2>WLED Software Update</h2><form method="POST"
4444
action="/update" id="uf" enctype="multipart/form-data" onsubmit="U()">
45-
Installed version: 0.13.0-b1<br>Download the latest binary: <a
45+
Installed version: 0.13.0-b2<br>Download the latest binary: <a
4646
href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img
4747
src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square">
4848
</a><br><input type="file" class="bt" name="update" required><br><input

wled00/html_settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
383383
<h3>Software Update</h3><button type="button" onclick="U()">Manual OTA Update
384384
</button><br>Enable ArduinoOTA: <input type="checkbox" name="AO"><br><h3>About
385385
</h3><a href="https://github.com/Aircoookie/WLED/" target="_blank">WLED</a>
386-
version 0.13.0-b1<br><br><a
386+
version 0.13.0-b2<br><br><a
387387
href="https://github.com/Aircoookie/WLED/wiki/Contributors-and-credits"
388388
target="_blank">Contributors, dependencies and special thanks</a><br>
389389
A huge thank you to everyone who helped me create WLED!<br><br>

0 commit comments

Comments
 (0)