From 51a00b2d113798544fc3ac29f623795a8f5c8379 Mon Sep 17 00:00:00 2001 From: Aaron Perley Date: Mon, 17 Oct 2016 00:09:46 -0400 Subject: Sunrise and twinkle timing --- twinkle.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'twinkle.py') diff --git a/twinkle.py b/twinkle.py index 6c788e9..3668b3c 100755 --- a/twinkle.py +++ b/twinkle.py @@ -95,9 +95,9 @@ class TwinkleShow(Show): def update(self): - if self.tick_count > 1000: + if self.tick_count > FRAME_RATE * 90: fade_time = 3 # sec - if self.tick_count > 1000 + fade_time * FRAME_RATE: + if self.tick_count > FRAME_RATE * 90 + fade_time * FRAME_RATE: self.stop() return for col in self.lights: @@ -105,7 +105,6 @@ class TwinkleShow(Show): light.fade_to_black(fade_time * FRAME_RATE) else: if random.random() < 0.01: - print "Adding star" self.stars.add(ShootingStar()) for col in self.lights: for light in col: @@ -125,7 +124,6 @@ class TwinkleShow(Show): light.blit() self.tick_count += 1 - print self.tick_count def compute_coverage(fish, x, y): -- cgit v1.3.1