summaryrefslogtreecommitdiffstats
path: root/src/js/fan_speed.js
diff options
context:
space:
mode:
authorRoger Zanoni <rzanoni@igalia.com>2023-12-28 20:07:05 -0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-01-29 12:07:20 +0000
commitc323ab8fde212120d8d1914d453afeb55b3576e5 (patch)
tree2f3565da1e623d69297b00d2a5e1e2b261692810 /src/js/fan_speed.js
parent5f1b6075982b872b5db4e2195e53d19529278d5c (diff)
Update HVAC app to use grpc-web instead of websockets
Adapt the HTML5 applications to use kuksa.val service Bug-AGL: SPEC-4599 Signed-off-by: Roger Zanoni <rzanoni@igalia.com> Change-Id: I3e36a6c08041db8fb59fd7f20497c1c156bbb2f7
Diffstat (limited to 'src/js/fan_speed.js')
-rw-r--r--src/js/fan_speed.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/js/fan_speed.js b/src/js/fan_speed.js
index fa0ed01..74e4748 100644
--- a/src/js/fan_speed.js
+++ b/src/js/fan_speed.js
@@ -17,7 +17,8 @@
var value = 0;
var node = null;
-export function update(path, value) {
+export function update(path, dp) {
+ var value = dp.getUint32();
node.value = value;
node.parentNode.getElementsByTagName('progress')[0].value = value;
}
@@ -26,6 +27,6 @@ export function init() {
node = document.getElementById('FanSpeed');
}
-export function set() {
- KUKSA.set(PATHS.leftFanSpeed, node.value);
+export function set(value) {
+ KUKSA.setUInt32(PATHS.leftFanSpeed, value);
}