Commit a02edcba authored by Federico Meloda's avatar Federico Meloda
Browse files

minor led bugfixes

parent f7dc6e32
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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