diff options
author | Walter Bender <walter@sugarlabs.org> | 2010-12-24 19:35:01 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2010-12-24 19:35:01 (GMT) |
commit | 9b9061f8dbbfef4696226a43285109e3a63146b7 (patch) | |
tree | bcdbfbbadef00b9235aaf4e3d879e1b72e675d21 /TurtleArt/tawindow.py | |
parent | 2e05bede70d995e2affd57c81a8e4453a8986af6 (diff) |
adding luminance block; checking for camera before creating palette entries
Diffstat (limited to 'TurtleArt/tawindow.py')
-rwxr-xr-x | TurtleArt/tawindow.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index ceb9a69..45c5282 100755 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -25,6 +25,7 @@ import pygtk pygtk.require('2.0') import gtk import gobject +import gst import os import os.path import dbus @@ -262,6 +263,14 @@ class TurtleArtWindow(): PALETTES[PALETTE_NAMES.index('sensor')].append('voltage') self.audio_started = False + self.camera = False + v4l2src = gst.element_factory_make('v4l2src') + if v4l2src.props.device_name is not None: + PALETTES[PALETTE_NAMES.index('sensor')].append('readcamera') + PALETTES[PALETTE_NAMES.index('sensor')].append('luminance') + PALETTES[PALETTE_NAMES.index('sensor')].append('camera') + self.camera = True + """ The following code will initialize a USB RFID reader. Please note that in order to make this initialization function work, it is necessary to |