Browse Source

防抖加入

moki 1 tuần trước cách đây
mục cha
commit
e771a0d16a
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      firmware/ai_light.ino

+ 2 - 0
firmware/ai_light.ino

@@ -255,6 +255,8 @@ void setMode(String mode) {
   }
   if (mode == "idle") mode = "traffic";
 
+  if (mode == currentMode) return;
+
   currentMode = mode;
   modeStart = millis();