fix capture.py, add imago-camera, imago-timer
[imago.git] / src / capture.py
index dd7f47f..b9563ff 100755 (executable)
@@ -53,7 +53,8 @@ class Capture:
     def live(self, q):
         """Run live preview on the screen."""
         clock = pygame.time.Clock()
-        while True: 
+        done = False
+        while not done: 
             if q:
                 try:
                     line = q.get_nowait() # or q.get(timeout=.1)
@@ -80,7 +81,8 @@ class Capture:
         last = 0
         clock = pygame.time.Clock()
 
-        while True:
+        done = False
+        while not done:
             for event in pygame.event.get():
                 if event.type == pygame.QUIT:
                     done = True
@@ -101,6 +103,7 @@ class Capture:
             
     def take(self):
         """Take a new image from the camera."""
+        print "taking pic"
         im = self.cam.get_image()
         self.screen.display_picture(im)
         im.save(self.saving_dir + "{0:0>3}.jpg".format(self.im_number), 'JPEG')