diff options
author | Roger Zanoni <rzanoni@igalia.com> | 2022-11-02 10:16:03 +0100 |
---|---|---|
committer | Roger Zanoni <rzanoni@igalia.com> | 2022-11-02 14:51:15 +0100 |
commit | b0c869c0461741413af9e6a24f6e156717b6362f (patch) | |
tree | 1e7efd54e4c426d1b50dd7676e1186857b88802f /src/js/fan_speed.js | |
parent | 6abbe876aee09b225af9329e28b4fa2cc4d4c220 (diff) |
Adapt the demo to use kuksa.val service
- The "AUTO" element was removed because there's no compatible
VSS signal.
- Removed the indicators below the seats and now they work only
to toggle the state of the seat warmer.
- The air distribution buttons now work as a radio group as there
is only one AirDistribution setting per cabin.
Bug-AGL: SPEC-4599
Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
Change-Id: Ibfaa477a7c27627ac524f39dd809b7a2195c7c9f
Diffstat (limited to 'src/js/fan_speed.js')
-rw-r--r-- | src/js/fan_speed.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/js/fan_speed.js b/src/js/fan_speed.js index 8b131b5..fa0ed01 100644 --- a/src/js/fan_speed.js +++ b/src/js/fan_speed.js @@ -15,15 +15,17 @@ */ var value = 0; +var node = null; -function update(node, value) { +export function update(path, value) { node.value = value; node.parentNode.getElementsByTagName('progress')[0].value = value; } -module.exports = { - set: function(node) { - value = node.value; - update(node, value); - } -}
\ No newline at end of file +export function init() { + node = document.getElementById('FanSpeed'); +} + +export function set() { + KUKSA.set(PATHS.leftFanSpeed, node.value); +} |