moki 1 неделя назад
Родитель
Сommit
c5c9006bdd
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      firmware/ai_light.ino

+ 3 - 3
firmware/ai_light.ino

@@ -55,7 +55,7 @@ const int GREEN_PIN = 2;
 const int RED_PIN = 3;
 const int YELLOW_PIN = 4;
 const int WIFI_LED_PIN = 8;
-const int BOOT_PIN = 9;
+const int BTN_BOOT_PIN = 9;
 
 const int PWM_FREQ = 5000;
 const int PWM_RESOLUTION = 8;
@@ -412,7 +412,7 @@ bool bootWasPressed = false;
 bool switchTriggered = false;
 
 void checkBootButton() {
-  bool pressed = (digitalRead(BOOT_PIN) == LOW);
+  bool pressed = (digitalRead(BTN_BOOT_PIN) == LOW);
   if (pressed && !bootWasPressed) {
     bootPressStart = millis();
     bootWasPressed = true;
@@ -591,7 +591,7 @@ void setup() {
   ledcAttach(YELLOW_PIN, PWM_FREQ, PWM_RESOLUTION);
   ledcAttach(GREEN_PIN, PWM_FREQ, PWM_RESOLUTION);
   pinMode(WIFI_LED_PIN, OUTPUT);
-  pinMode(BOOT_PIN, INPUT_PULLUP);
+  pinMode(BTN_BOOT_PIN, INPUT_PULLUP);
   digitalWrite(WIFI_LED_PIN, HIGH);
   allOff();