This commit is contained in:
parent
d96504d3eb
commit
f6681d54de
3 changed files with 36 additions and 12 deletions
|
|
@ -301,6 +301,10 @@
|
|||
<input type="checkbox" name="onoffswitch" id="led-switch" onclick="gpio()">
|
||||
<span class="toggle button">toggle signal led</span>
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" name="whiteswitch" id="white-switch" onclick="leds()">
|
||||
<span class="toggle button">toggle white leds</span>
|
||||
</label>
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
|
|
@ -446,6 +450,13 @@
|
|||
wsWrite('D');
|
||||
}
|
||||
|
||||
function leds() {
|
||||
if (document.getElementById('white-switch').checked)
|
||||
wsWrite('e');
|
||||
else
|
||||
wsWrite('d');
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
wsOpen();
|
||||
startPolling();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue