diff options
Diffstat (limited to 'src/js/temperature.js')
-rw-r--r-- | src/js/temperature.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/js/temperature.js b/src/js/temperature.js index 1e35ddf..2d29b7c 100644 --- a/src/js/temperature.js +++ b/src/js/temperature.js @@ -40,7 +40,8 @@ function createTemperatureElement() { return element; } -export function update(path, value) { +export function update(path, dp) { + var value = dp.getInt32(); var temperature, node; if (path == PATHS.rightSeatTemperature) { values.rightTemperature = value; @@ -69,8 +70,7 @@ export function left() { isScrolling = setTimeout(function() { var index = Math.round(controls.leftTemperatureNode.scrollTop / elementHeight); values.leftTemperature = temperatures[index]; - console.log('LEFT', values.leftTemperature); - KUKSA.set(PATHS.leftSeatTemperature, values.leftTemperature); + KUKSA.setInt32(PATHS.leftSeatTemperature, values.leftTemperature); }, 100); } @@ -80,8 +80,7 @@ export function right() { isScrolling = setTimeout(function() { var index = Math.round(controls.rightTemperatureNode.scrollTop / elementHeight); values.rightTemperature = temperatures[index]; - console.log('RIGHT', values.rightTemperature); - KUKSA.set(PATHS.rightSeatTemperature, values.rightTemperature); + KUKSA.setInt32(PATHS.rightSeatTemperature, values.rightTemperature); }, 100); } |