Browse Source

防抖加入

moki 1 week ago
parent
commit
e771a0d16a
1 changed files with 2 additions and 0 deletions
  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();