Skip to content

Commit

Permalink
added gitignore, blocks to return motor values.
Browse files Browse the repository at this point in the history
  • Loading branch information
itdaniher committed Mar 16, 2011
1 parent 971ca95 commit 0927884
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*pyc
2 changes: 1 addition & 1 deletion TurtleArt/turtleart
Submodule turtleart updated from 867630 to e46262
22 changes: 22 additions & 0 deletions TurtleArt/wedo_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,28 @@ def setup(self):
prim_name = 'distance')

self._parent.lc.def_prim('distance', 0, lambda self: primitive_dictionary['distance']())

primitive_dictionary['getMotorA'] = self.WeDo.getMotorA

palette.add_block('getMotorA',
style='box-style',
label=_('Motor A Value'),
help_string=_('returns the current value of Motor A'),
value_block=True,
prim_name = 'getMotorA')

self._parent.lc.def_prim('getMOtorA', 0, lambda self: primitive_dictionary['getMotorA']())

primitive_dictionary['getMotorB'] = self.WeDo.getMotorA

palette.add_block('getMotorB',
style='box-style',
label=_('Motor B Value'),
help_string=_('returns the current value of Motor B'),
value_block=True,
prim_name = 'getMotorB')

self._parent.lc.def_prim('getMOtorB', 0, lambda self: primitive_dictionary['getMotorB']())

primitive_dictionary['setMotorA'] = self.WeDo.setMotorA

Expand Down

0 comments on commit 0927884

Please sign in to comment.