Просмотр исходного кода

change default LED GPIO pin to 18

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 1 месяц назад
Родитель
Сommit
c3329543cd
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      modules/core/state.py
  2. 1 1
      modules/led/dw_led_controller.py

+ 2 - 2
modules/core/state.py

@@ -66,7 +66,7 @@ class AppState:
 
 
         # DW LED settings
         # DW LED settings
         self.dw_led_num_leds = 60  # Number of LEDs in strip
         self.dw_led_num_leds = 60  # Number of LEDs in strip
-        self.dw_led_gpio_pin = 12  # GPIO pin (12, 13, 18, or 19)
+        self.dw_led_gpio_pin = 18  # GPIO pin (12, 13, 18, or 19)
         self.dw_led_pixel_order = "GRB"  # Pixel color order for WS281x (GRB, RGB, BGR, etc.)
         self.dw_led_pixel_order = "GRB"  # Pixel color order for WS281x (GRB, RGB, BGR, etc.)
         self.dw_led_brightness = 35  # Brightness 0-100
         self.dw_led_brightness = 35  # Brightness 0-100
         self.dw_led_speed = 128  # Effect speed 0-255
         self.dw_led_speed = 128  # Effect speed 0-255
@@ -320,7 +320,7 @@ class AppState:
         self.wled_ip = data.get('wled_ip', None)
         self.wled_ip = data.get('wled_ip', None)
         self.led_provider = data.get('led_provider', "none")
         self.led_provider = data.get('led_provider', "none")
         self.dw_led_num_leds = data.get('dw_led_num_leds', 60)
         self.dw_led_num_leds = data.get('dw_led_num_leds', 60)
-        self.dw_led_gpio_pin = data.get('dw_led_gpio_pin', 12)
+        self.dw_led_gpio_pin = data.get('dw_led_gpio_pin', 18)
         self.dw_led_pixel_order = data.get('dw_led_pixel_order', "GRB")
         self.dw_led_pixel_order = data.get('dw_led_pixel_order', "GRB")
         self.dw_led_brightness = data.get('dw_led_brightness', 35)
         self.dw_led_brightness = data.get('dw_led_brightness', 35)
         self.dw_led_speed = data.get('dw_led_speed', 128)
         self.dw_led_speed = data.get('dw_led_speed', 128)

+ 1 - 1
modules/led/dw_led_controller.py

@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__)
 class DWLEDController:
 class DWLEDController:
     """Dune Weaver LED Controller for NeoPixel LED strips"""
     """Dune Weaver LED Controller for NeoPixel LED strips"""
 
 
-    def __init__(self, num_leds: int = 60, gpio_pin: int = 12, brightness: float = 0.35,
+    def __init__(self, num_leds: int = 60, gpio_pin: int = 18, brightness: float = 0.35,
                  pixel_order: str = "GRB", speed: int = 128, intensity: int = 128):
                  pixel_order: str = "GRB", speed: int = 128, intensity: int = 128):
         """
         """
         Initialize Dune Weaver LED controller
         Initialize Dune Weaver LED controller