jfabry / LiveRobotProgramming

Live Robot Programming
http://pleiad.cl/lrp
8 stars 3 forks source link

Event subscriptions: test-and-set required #124

Open mcamp opened 8 years ago

mcamp commented 8 years ago

We should support "event" subscription. There are data that is sent only once when something happens, like the result of the action lib or the bumper of the turtlebot in simulation. Now, for this kind of subscriptions, I add on the onentry action of the state where the subscription is needed. The onentry action "reset" the value to nil and I checked everytime is the variable is nil or not. We need something special to not overload the sourcecode with this kind of onentry action.

This onentry actions work well, howevery when we need the specific value of this subscription the program need to check first if the value is nil, then check the actual value. This also should be fixed