linting
This commit is contained in:
parent
3b0317b118
commit
7555ac97fd
|
@ -1,4 +1,3 @@
|
|||
import time
|
||||
import plasma
|
||||
from plasma import plasma_stick
|
||||
from math import sin
|
||||
|
@ -38,5 +37,3 @@ while True:
|
|||
# for i in range(NUM_LEDS):
|
||||
# led_strip.set_hsv(i, COLOUR, (1 + sin(offset)) / 2, 0.8)
|
||||
# offset += 0.002
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ def display_current():
|
|||
for i in range(NUM_LEDS):
|
||||
led_strip.set_rgb(i, current_leds[i][0], current_leds[i][1], current_leds[i][2])
|
||||
|
||||
|
||||
def move_to_target():
|
||||
# nudge our current colours closer to the target colours
|
||||
for i in range(NUM_LEDS):
|
||||
|
|
|
@ -26,6 +26,7 @@ def display_current():
|
|||
for i in range(NUM_LEDS):
|
||||
led_strip.set_rgb(i, current_leds[i][0], current_leds[i][1], current_leds[i][2])
|
||||
|
||||
|
||||
def move_to_target():
|
||||
# nudge our current colours closer to the target colours
|
||||
for i in range(NUM_LEDS):
|
||||
|
|
|
@ -27,10 +27,10 @@ led_strip = plasma.WS2812(NUM_LEDS, 0, 0, plasma_stick.DAT, color_order=plasma.C
|
|||
# start updating the LED strip
|
||||
led_strip.start()
|
||||
|
||||
#initial setup
|
||||
# initial setup
|
||||
for i in range(NUM_LEDS):
|
||||
if i % LIGHT_RATIO == 0: # add an appropriate number of lights
|
||||
led_strip.set_hsv(i, *choice(LIGHT_COLOURS)) ## choice randomly chooses from a list
|
||||
led_strip.set_hsv(i, *choice(LIGHT_COLOURS)) # choice randomly chooses from a list
|
||||
else: # GREEN
|
||||
led_strip.set_hsv(i, *TREE_COLOUR)
|
||||
|
||||
|
@ -40,4 +40,3 @@ while True:
|
|||
if (i % LIGHT_RATIO == 0) and (random() < LIGHT_CHANGE_CHANCE):
|
||||
led_strip.set_hsv(i, *choice(LIGHT_COLOURS))
|
||||
time.sleep(0.5)
|
||||
|
||||
|
|
Loading…
Reference in New Issue