diff options
| author | Raymond Hogenson <rayhogenson@openmailbox.org> | 2016-09-30 21:45:03 -0400 |
|---|---|---|
| committer | Raymond Hogenson <rayhogenson@openmailbox.org> | 2016-09-30 21:45:03 -0400 |
| commit | 6d33edbed15bacae2698cba32d60c812e54f5b7b (patch) | |
| tree | 6e814fa90d90801b8fcd2418504203ddf950691e /bridge.py | |
| parent | dd7dd93d9e1ee2e0095f0fa403a499b69aa289a8 (diff) | |
| download | bridge-6d33edbed15bacae2698cba32d60c812e54f5b7b.tar.zst | |
Meeting 2
Diffstat (limited to 'bridge.py')
| -rwxr-xr-x | bridge.py | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -1,15 +1,16 @@ #!/usr/bin/python2 """Simple demo of oscillating colors.""" -from __future__ import division, unicode_literals +from __future__ import division, print_function import color import constants -from DummyRig import DummyRig import fish_render import time +import random try: import lumiversepython except ImportError: have_lumiversepython = False + from DummyRig import DummyRig else: have_lumiversepython = True @@ -27,11 +28,20 @@ def get_all_lights(rig): def demo(lights, rig): """Do some light things.""" - fish = fish_render.Fish(0, 0, 2, 1, color.red, 1 / constants.FRAME_RATE) + #fish = fish_render.Fish(0, 0, 15, 1.5, color.black, 0.05 / constants.FRAME_RATE) + #fish = fish_render.Fish(0, 0, 23, 1.5, color.RGB(193 / 255, 68 / 255, 227 / 255), 0.05 / constants.FRAME_RATE) + fish = fish_render.Fish(0, 0, 23, 1.5, color.black, 0.05 / constants.FRAME_RATE) bridge = fish_render.Bridge(lights, fish, rig) + current_time = time.time() + count = 0 while True: bridge.update() - time.sleep(1 / constants.FRAME_RATE) + if count % constants.FRAME_RATE == 0: + time_delta = time.time() - current_time + print(time_delta) + current_time = time.time() + #time.sleep(1 / constants.FRAME_RATE) + count += 1 def main(): |
