瀏覽代碼

Add 0t support

Emil 3 年之前
父節點
當前提交
1fd380c8a7
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      js/spotlight.js

+ 5 - 0
js/spotlight.js

@@ -97,6 +97,11 @@ function changeVar(value, setting) {
         sendValue = ((r << 24) + (g << 16) + (b << 8) + w) >>>0
         //console.log(sendValue)
         //console.log((sendValue >>> 0).toString(2))
+    } else if (value.substring(0,2) === "0t") {
+        const lowAndHigh = value.split(":")
+        const lowTime = parseInt(lowAndHigh[0]);
+        const highTime = parseInt(lowAndHigh[1]);
+        sendValue = (lowTime << 16) + highTime >>>0
     } else {
         sendValue = Number(value)
     }