diff options
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); +} |