Commit 27a96e78 authored by Federico Meloda's avatar Federico Meloda

minor bugfix in lightly

parent 2490ee62
...@@ -21,7 +21,7 @@ class Color: ...@@ -21,7 +21,7 @@ class Color:
class ColorManager(Thread): class ColorManager(Thread):
current_rand = 1 current_rand = 1
unscaled_blue = 0 unscaled_blue = 100
current_color = Color(0, 0, 0) current_color = Color(0, 0, 0)
activeFlag = True activeFlag = True
spi = spidev.SpiDev() spi = spidev.SpiDev()
...@@ -41,8 +41,8 @@ class ColorManager(Thread): ...@@ -41,8 +41,8 @@ class ColorManager(Thread):
self.current_color.green += rand self.current_color.green += rand
self.current_color.red = 255 self.current_color.red = 255
self.current_color.blue = self.unscaled_blue * self.current_color.green//255 self.current_color.blue = self.unscaled_blue * self.current_color.green//255
if self.unscaled_blue > 0 : if self.unscaled_blue < 100 :
self.unscaled_blue-- self.unscaled_blue++
def fade(self): def fade(self):
if self.current_color.red > 0: if self.current_color.red > 0:
...@@ -54,7 +54,7 @@ class ColorManager(Thread): ...@@ -54,7 +54,7 @@ class ColorManager(Thread):
self.activeFlag = False self.activeFlag = False
def burn(self): def burn(self):
self.unscaled_blue = 255 self.unscaled_blue = 0
def run(self): def run(self):
while self.is_alive(): while self.is_alive():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment