Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarion <marion.zepf@gmail.com>2013-09-16 15:07:55 (GMT)
committer Marion <marion.zepf@gmail.com>2013-09-16 15:07:55 (GMT)
commit5164a35bd525279f411430526e7df25b68c11be0 (patch)
tree352334d724f8273fcb3e7e69df47fbe3cadbd8b2
parentf693181ce295ad099a499262b1bdd9f4af9e45bf (diff)
always setup the cameras when running exported code
- There seems to be no way to predict whether we'll need them.
-rw-r--r--plugins/camera_sensor/camera_sensor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/camera_sensor/camera_sensor.py b/plugins/camera_sensor/camera_sensor.py
index 6509a88..67eb77d 100644
--- a/plugins/camera_sensor/camera_sensor.py
+++ b/plugins/camera_sensor/camera_sensor.py
@@ -174,8 +174,9 @@ is pushed to the stack'),
def start(self):
''' Initialize the camera if there is an camera block in use '''
- if len(self._parent.block_list.get_similar_blocks('block',
- ['camera', 'camera1', 'read_camera', 'luminance'])) > 0:
+ if (not self._parent.running_turtleart
+ or len(self._parent.block_list.get_similar_blocks('block',
+ ['camera', 'camera1', 'read_camera', 'luminance'])) > 0):
if self._status and len(self.cameras) == 0:
for device in self.devices:
self.cameras.append(Camera(device))