Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-02-21 12:55:22 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-02-21 12:55:22 (GMT)
commit6a078dc0c3cd65ffd6fdb26eefa8dbfd0e3da679 (patch)
tree28e684fefcf9a48fe9dc65e4f469f4e99feafe33
parent473e0ab8b2c13321770b391715c88049388dde67 (diff)
reinstated readcamera block for backward compatibility
-rw-r--r--plugins/camera_plugin.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/camera_plugin.py b/plugins/camera_plugin.py
index e443933..3061d39 100644
--- a/plugins/camera_plugin.py
+++ b/plugins/camera_plugin.py
@@ -72,6 +72,17 @@ class Camera_plugin(Plugin):
self._parent.lc._def_prim('luminance', 0,
lambda self: PLUGIN_DICTIONARY['luminance'](True))
+ # Depreciated block
+ BOX_STYLE.append('readcamera')
+ BLOCK_NAMES['readcamera'] = [_('read camera')]
+ HELP_STRINGS['readcamera'] = \
+ _("Average RGB color from camera is pushed to the stack")
+ VALUE_BLOCKS.append('readcamera')
+ PRIMITIVES['readcamera'] = 'readcamera'
+ PLUGIN_DICTIONARY['readcamera'] = self.prim_read_camera
+ self._parent.lc._def_prim('readcamera', 0,
+ lambda self: PLUGIN_DICTIONARY['readcamera'](True))
+
PALETTES[PALETTE_NAMES.index('sensor')].append('camera')
BOX_STYLE_MEDIA.append('camera')
CONTENT_BLOCKS.append('camera')