Skip to content

Commit 5e0a83a

Browse files
EricEric
authored andcommitted
v0.8.9 Fixed Camera Worker
1 parent 685b79d commit 5e0a83a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

workers/camera_worker.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ def init(self):
4343
try:
4444
self.camera = PiCamera(resolution=(self.resolutionX, self.resolutionY))
4545
# Below we calibrate the camera for consistent imaging
46-
camera.framerate = 30
46+
self.camera.framerate = 30
4747
# Wait for the automatic gain control to settle
4848
time.sleep(2)
4949
# Now fix the values
50-
camera.shutter_speed = camera.exposure_speed
51-
camera.exposure_mode = 'off'
52-
g = camera.awb_gains
53-
camera.awb_mode = 'off'
54-
camera.awb_gains = g
50+
self.camera.shutter_speed = self.camera.exposure_speed
51+
self.camera.exposure_mode = 'off'
52+
g = self.camera.awb_gains
53+
self.camera.awb_mode = 'off'
54+
self.camera.awb_gains = g
5555
except:
5656
self.camera = PiCamera()
5757

0 commit comments

Comments
 (0)