kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Linting Fixes
rodzic
f92d35a014
commit
4393372726
|
|
@ -53,7 +53,6 @@ enc = BreakoutEncoder(i2c)
|
|||
enc.set_brightness(1.0)
|
||||
|
||||
|
||||
|
||||
COLOUR, ANGLE, BRIGHTNESS, SPEED = range(4)
|
||||
|
||||
|
||||
|
|
@ -87,7 +86,7 @@ def speed_gauge(v, vmax=100):
|
|||
led_strip.set_rgb(i, 255, 0, 0)
|
||||
|
||||
|
||||
def brightness_gauge(v, vmax = 100):
|
||||
def brightness_gauge(v, vmax=100):
|
||||
light_pixels = NUM_LEDS * v / vmax
|
||||
|
||||
for i in range(NUM_LEDS):
|
||||
|
|
@ -143,7 +142,6 @@ while True:
|
|||
speed = min(100, max(0, speed))
|
||||
speed_gauge(brightness, 100)
|
||||
|
||||
|
||||
sw_pressed = user_sw.read()
|
||||
a_pressed = button_a.read()
|
||||
b_pressed = button_b.read()
|
||||
|
|
@ -156,7 +154,7 @@ while True:
|
|||
|
||||
if b_pressed:
|
||||
if not cycle:
|
||||
start_time = time.millis();
|
||||
start_time = time.ticks_ms()
|
||||
cycle = True
|
||||
speed = min(255, max(1, speed))
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue