Created
September 16, 2014 11:48
-
-
Save doudou/0ff1b3ac8f2d397c0307 to your computer and use it in GitHub Desktop.
Fix for non-pull connection for state reading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def on_state_change(&block) | |
port('state').reader(:init => true, :pull => true, :type => buffer, :size => 100).on_data do |state| | |
block.call(obj.state_symbols[state]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment