Skip to content

Commit

Permalink
fixed some timings
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolukas committed Sep 23, 2016
1 parent c02063f commit 1c95c48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/fabscan/scanner/laserscanner/FSCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def startStream(self, auto_exposure=False):
self.semaphore.acquire()
self.is_idle = False
self.semaphore.release()
time.sleep(1)
self.camera_buffer.flush()
time.sleep(0.5)

def stopStream(self):
self.semaphore.acquire()
Expand All @@ -258,19 +259,18 @@ def setExposureMode(self, auto_exposure=False):

self.camera.iso = 120
# Wait for the automatic gain control to settle
time.sleep(2)
time.sleep(1.4)
# Now fix the values
self.camera.shutter_speed = self.camera.exposure_speed
self.camera.exposure_mode = 'off'
g = self.camera.awb_gains
self.camera.awb_mode = 'off'
self.camera.awb_gains = g

else:
self.camera.awb_mode = "flash"
time.sleep(1)

self.camera_buffer.flush()


class DummyCam:

Expand Down
4 changes: 3 additions & 1 deletion src/fabscan/scanner/laserscanner/FSScanProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def finish_texture_scan(self):

self.hardwareController.camera.device.stopStream()
self.hardwareController.camera.device.flushStream()
time.sleep(0.8)

self._worker_pool.kill()

Expand Down Expand Up @@ -280,9 +281,10 @@ def init_object_scan(self):

self.hardwareController.led.on(self.settings.led.red, self.settings.led.green, self.settings.led.blue)
self.hardwareController.laser.on()
time.sleep(0.5)
self.hardwareController.camera.device.startStream()
self.hardwareController.camera.device.flushStream()
time.sleep(0.8)
time.sleep(0.5)

#self._laser_angle = self.image_processor.calculate_laser_angle(self.hardwareController.camera.device.getFrame())
self._laser_angle = self.settings.backwall.laser_angle
Expand Down

0 comments on commit 1c95c48

Please sign in to comment.