Commit a02edcba authored by Federico Meloda's avatar Federico Meloda

minor led bugfixes

parent f7dc6e32
......@@ -42,16 +42,16 @@ class ColorManager(Thread):
def get_color(self):
if self.current_color.green + self.current_rand > (80-(self.pow_time/4000):
if self.current_color.green + self.current_rand > (80-(self.pow_time//4000)):
self.current_rand = -randint(1, 8)
self.current_color = Color(80-(50*self.pow_time/10000), 255, 30)
self.current_color = Color(80-(50*self.pow_time//10000), 255, 30)
elif self.current_color.green + self.current_rand < 0:
self.current_rand = randint(1, 8)
self.current_color = Color(0, 255, 30-self.pow_time/10000)
self.current_color = Color(0, 255, 30-self.pow_time//10000)
else:
self.current_color.green += self.current_rand
self.current_color.red = 255
self.current_color.blue = 30-(30*self.pow_time/10000)
self.current_color.blue = 30-(30*self.pow_time//10000)
if self.pow_time > 0:
self.pow_time -= 1
......
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