aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/index.html2
-rw-r--r--ui/js/api.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/ui/index.html b/ui/index.html
index 1183672..3d93944 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -69,7 +69,7 @@
<details open>
<summary>Verlichting</summary>
<div class="light_controls">
- <input id="lightsInput" type="range" min="0" max="100" step="10" value="0" oninput="api.msg.send.lights(this)"/>
+ <input id="lightsInput" type="range" min="0" max="10" step="1" value="0" oninput="api.msg.send.lights(this)"/>
<div>Felheid: <span id="lightsValue">??</span>%</div>
</div>
</details>
diff --git a/ui/js/api.js b/ui/js/api.js
index 48bd9e5..bc7803d 100644
--- a/ui/js/api.js
+++ b/ui/js/api.js
@@ -22,7 +22,7 @@ const api = {
barrier: open => setPolkaDot(document.getElementById("barrierValue"), open),
trafficLights: state => document.getElementById("trafficLightsValue").innerText = state,
lights: value => {
- document.getElementById("lightsValue").innerText = value;
+ document.getElementById("lightsValue").innerText = value * 10;
document.getElementById("lightsInput").value = value;
},
matrix: state => document.getElementById("matrixValue").value = state,
@@ -82,7 +82,7 @@ const api = {
},
lights: el => {
var value = Number(el.value);
- send({ type: 'lights', value: value / 10 });
+ send({ type: 'lights', value });
api.update.lights(value);
},
matrix: el => {