2019-11-27 22:28:13 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta name="viewport" content="width=500">
|
2020-05-17 21:39:57 +02:00
|
|
|
<meta charset="utf-8">
|
2019-11-27 22:28:13 +01:00
|
|
|
<title>Time Settings</title>
|
|
|
|
<script>
|
|
|
|
var d=document;
|
|
|
|
function H()
|
|
|
|
{
|
|
|
|
window.open("https://github.com/Aircoookie/WLED/wiki/Settings#time-settings");
|
|
|
|
}
|
|
|
|
function B()
|
|
|
|
{
|
|
|
|
window.open("/settings","_self");
|
|
|
|
}
|
|
|
|
function S()
|
|
|
|
{
|
|
|
|
BTa();GetV();Cs();FC();
|
|
|
|
}
|
|
|
|
function gId(s)
|
|
|
|
{
|
|
|
|
return d.getElementById(s);
|
|
|
|
}
|
|
|
|
function Cs()
|
|
|
|
{
|
|
|
|
gId("cac").style.display="none";
|
|
|
|
gId("coc").style.display="block";
|
|
|
|
gId("ccc").style.display="none";
|
|
|
|
if (gId("ca").selected)
|
|
|
|
{
|
|
|
|
gId("cac").style.display="block";
|
|
|
|
}
|
|
|
|
if (gId("cc").selected)
|
|
|
|
{
|
|
|
|
gId("coc").style.display="none";
|
|
|
|
gId("ccc").style.display="block";
|
|
|
|
}
|
|
|
|
if (gId("cn").selected)
|
|
|
|
{
|
|
|
|
gId("coc").style.display="none";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function BTa()
|
|
|
|
{
|
2020-11-07 23:54:56 +01:00
|
|
|
var ih="<tr><th>Active</th><th>Hour</th><th>Minute</th><th>Preset</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr>";
|
2019-11-27 22:28:13 +01:00
|
|
|
for (i=0;i<8;i++)
|
|
|
|
{
|
2020-11-08 23:44:10 +01:00
|
|
|
ih+="<tr><td><input name=\"W"+i+"\" id=\"W"+i+"\" type=\"number\" style=\"display:none\"><input id=\"W"+i+"0\" type=\"checkbox\"></td><td><input name=\"H"+i+"\" type=\"number\" min=\"0\" max=\"24\"></td><td><input name=\"N"+i+"\" type=\"number\" min=\"0\" max=\"59\"></td><td><input name=\"T"+i+"\" type=\"number\" min=\"0\" max=\"250\"></td>";
|
2019-11-27 22:28:13 +01:00
|
|
|
for (j=1;j<8;j++) ih+="<td><input id=\"W"+i+j+"\" type=\"checkbox\"></td>";
|
|
|
|
}
|
|
|
|
gId("TMT").innerHTML=ih;
|
|
|
|
}
|
|
|
|
function FC()
|
|
|
|
{
|
|
|
|
for(j=0;j<8;j++)
|
|
|
|
{
|
|
|
|
for(i=0;i<8;i++) gId("W"+i+j).checked=gId("W"+i).value>>j&1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function Wd()
|
|
|
|
{
|
|
|
|
a=[0,0,0,0,0,0,0,0];
|
|
|
|
for(i=0;i<8;i++)
|
|
|
|
{
|
|
|
|
m=1;
|
|
|
|
for(j=0;j<8;j++)
|
|
|
|
{
|
|
|
|
a[i]+=gId("W"+i+j).checked*m;m*=2;
|
|
|
|
}
|
|
|
|
gId("W"+i).value=a[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function GetV()
|
|
|
|
{
|
|
|
|
//values injected by server while sending HTML
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style>
|
2020-06-10 12:45:44 +02:00
|
|
|
@import url("style.css");
|
2019-11-27 22:28:13 +01:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body onload="S()">
|
|
|
|
<form id="form_s" name="Sf" method="post" onsubmit="Wd()">
|
|
|
|
<div class="helpB"><button type="button" onclick="H()">?</button></div>
|
|
|
|
<button type="button" onclick="B()">Back</button><button type="submit">Save</button><hr>
|
|
|
|
<h2>Time setup</h2>
|
|
|
|
Get time from NTP server: <input type="checkbox" name="NT"><br>
|
2019-12-04 02:01:47 +01:00
|
|
|
<input name="NS" maxlength="32"><br>
|
2019-11-27 22:28:13 +01:00
|
|
|
Use 24h format: <input type="checkbox" name="CF"><br>
|
|
|
|
Time zone:
|
|
|
|
<select name="TZ">
|
|
|
|
<option value="0" selected>GMT(UTC)</option>
|
|
|
|
<option value="1">GMT/BST</option>
|
|
|
|
<option value="2">CET/CEST</option>
|
|
|
|
<option value="3">EET/EEST</option>
|
|
|
|
<option value="4">US-EST/EDT</option>
|
|
|
|
<option value="5">US-CST/CDT</option>
|
|
|
|
<option value="6">US-MST/MDT</option>
|
|
|
|
<option value="7">US-AZ</option>
|
|
|
|
<option value="8">US-PST/PDT</option>
|
|
|
|
<option value="9">CST(AWST)</option>
|
|
|
|
<option value="10">JST(KST)</option>
|
|
|
|
<option value="11">AEST/AEDT</option>
|
|
|
|
<option value="12">NZST/NZDT</option>
|
2020-09-27 11:43:28 +02:00
|
|
|
<option value="13">North Korea</option>
|
|
|
|
<option value="14">IST (India)</option>
|
|
|
|
<option value="15">CA-Saskatchewan</option>
|
|
|
|
<option value="16">ACST</option>
|
|
|
|
<option value="17">ACST/ACDT</option>
|
2019-11-27 22:28:13 +01:00
|
|
|
</select><br>
|
|
|
|
UTC offset: <input name="UO" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br>
|
|
|
|
Current local time is <span class="times">unknown</span>.
|
|
|
|
<h3>Clock</h3>
|
|
|
|
Clock Overlay:
|
|
|
|
<select name="OL" onchange="Cs()">
|
|
|
|
<option value="0" id="cn" selected>None</option>
|
|
|
|
<option value="1" id="ca">Analog Clock</option>
|
|
|
|
<option value="2">Single Digit Clock</option>
|
|
|
|
<option value="3" id="cc">Cronixie Clock</option>
|
|
|
|
</select><br>
|
|
|
|
<div id="coc">
|
|
|
|
First LED: <input name="O1" type="number" min="0" max="255" required> Last LED: <input name="O2" type="number" min="0" max="255" required><br>
|
|
|
|
<div id="cac">
|
|
|
|
12h LED: <input name="OM" type="number" min="0" max="255" required><br>
|
|
|
|
Show 5min marks: <input type="checkbox" name="O5"><br></div>
|
|
|
|
Seconds (as trail): <input type="checkbox" name="OS"><br>
|
|
|
|
</div>
|
|
|
|
<div id="ccc">
|
|
|
|
Cronixie Display: <input name="CX" maxlength="6"><br>
|
|
|
|
Cronixie Backlight: <input type="checkbox" name="CB"><br>
|
|
|
|
</div>
|
|
|
|
Countdown Mode: <input type="checkbox" name="CE"><br>
|
|
|
|
Countdown Goal:<br>
|
|
|
|
Year: 20 <input name="CY" type="number" min="0" max="99" required> Month: <input name="CI" type="number" min="1" max="12" required> Day: <input name="CD" type="number" min="1" max="31" required><br>
|
|
|
|
Hour: <input name="CH" type="number" min="0" max="23" required> Minute: <input name="CM" type="number" min="0" max="59" required> Second: <input name="CS" type="number" min="0" max="59" required><br>
|
2020-11-07 23:54:56 +01:00
|
|
|
<h3>Macro presets</h3>
|
|
|
|
<b>Macros have moved!</b><br>
|
|
|
|
<i>Presets now also can be used as macros to save both JSON and HTTP API commands.<br>
|
|
|
|
Just enter the preset id below!</i>
|
|
|
|
<i>Use 0 for the default action instead of a preset</i><br>
|
2020-11-08 23:44:10 +01:00
|
|
|
Alexa On/Off Preset: <input name="A0" type="number" min="0" max="250" required> <input name="A1" type="number" min="0" max="250" required><br>
|
2020-11-15 22:52:59 +01:00
|
|
|
Button short press Preset: <input name="MP" type="number" min="0" max="250" required><br>
|
2020-11-08 23:44:10 +01:00
|
|
|
Long Press: <input name="ML" type="number" min="0" max="250" required> Double press: <input name="MD" type="number" min="0" max="250" required><br>
|
|
|
|
Countdown-Over Preset: <input name="MC" type="number" min="0" max="250" required><br>
|
|
|
|
Timed-Light-Over Presets: <input name="MN" type="number" min="0" max="250" required><br>
|
2020-11-07 23:54:56 +01:00
|
|
|
<h3>Time-controlled presets</h3>
|
2019-11-27 22:28:13 +01:00
|
|
|
<div style="display: inline-block">
|
|
|
|
<table id="TMT">
|
|
|
|
</table></div><hr>
|
|
|
|
<button type="button" onclick="B()">Back</button><button type="submit">Save</button>
|
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
</html>
|