aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-04-10 09:08:32 +0200
committerlonkaars <loek@pipeframe.xyz>2024-04-10 09:08:32 +0200
commit054be597e639cc6294f37202b966fe5e53c13f99 (patch)
tree1416f2829f2464e5b1169643b6316e94f94cc681 /ui
parent8aa0c245595620810f181a6b3f49d66a6bd6b090 (diff)
fix lights range
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 => {