From eaa6acf100cc5138b36e17a11d4216e65f6d9949 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Thu, 4 Dec 2025 17:35:38 +1300 Subject: [PATCH] Remove unused variables --- src/patterns_base.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/patterns_base.py b/src/patterns_base.py index 2108700..bc0c18f 100644 --- a/src/patterns_base.py +++ b/src/patterns_base.py @@ -28,8 +28,6 @@ class Patterns: def __init__(self, pin, num_leds, color1=(0,0,0), color2=(0,0,0), brightness=127, selected="off", delay=100): self.n = NeoPixel(Pin(pin, Pin.OUT), num_leds) self.num_leds = num_leds - self.pattern_step = 0 - self.last_update = utime.ticks_ms() self.delay = delay self.brightness = brightness self.auto = False @@ -40,18 +38,6 @@ class Patterns: if not self.colors: # Ensure at least one color exists self.colors = [(0, 0, 0)] - self.transition_duration = delay * 50 # Default transition duration - self.hold_duration = delay * 10 # Default hold duration at each color - self.transition_step = 0 # Current step in the transition - self.current_color_idx = 0 # Index of the color currently being held/transitioned from - self.current_color = self.colors[self.current_color_idx] # The actual blended color - - self.hold_start_time = utime.ticks_ms() # Time when the current color hold started - - # New attributes for scanner patterns - self.scanner_direction = 1 # 1 for forward, -1 for backward - self.scanner_tail_length = 3 # Number of trailing pixels - self.n1 = 0 self.n2 = 0 self.n3 = 0 @@ -90,7 +76,6 @@ class Patterns: def update_num_leds(self, pin, num_leds): self.n = NeoPixel(Pin(pin, Pin.OUT), num_leds) self.num_leds = num_leds - self.pattern_step = 0 def set_color(self, num, color):