summaryrefslogtreecommitdiffstats
path: root/src/js/seats.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/seats.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/seats.js')
-rw-r--r--src/js/seats.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/js/seats.js b/src/js/seats.js
index 3afc481..91b45f6 100644
--- a/src/js/seats.js
+++ b/src/js/seats.js
@@ -30,7 +30,8 @@ export function init() {
controls.rightSeatWarmer = document.getElementById('RightChair');
}
-export function update(path, value) {
+export function update(path, dp) {
+ var value = dp.getBool();
switch (path) {
case PATHS.leftSeatWarmer:
values.leftSeatWarmer = value;
@@ -44,8 +45,8 @@ export function update(path, value) {
}
export function left() {
- KUKSA.set(PATHS.leftSeatWarmer, !values.leftSeatWarmer);
+ KUKSA.setBool(PATHS.leftSeatWarmer, !values.leftSeatWarmer);
}
export function right() {
- KUKSA.set(PATHS.rightSeatWarmer, !values.rightSeatWarmer);
+ KUKSA.setBool(PATHS.rightSeatWarmer, !values.rightSeatWarmer);
}