orocos-toolchain / orogen

Code generator for components and type handling in Rock - the Robot Construction Kit - and the Orocos Toolchain
http://rock-robotics.org
Other
4 stars 35 forks source link

fix: do not send the common state after a custom one in setTaskStates #147

Closed doudou closed 2 years ago

doudou commented 2 years ago

This reestablishes the pre-setTaskState behavior, that is to not send e.g. EXCEPTION after a custom exception in the exception/ runtime error/fatal error cases.

Since we were doing it purely from within TaskContext::exception() before, only the "real" state was sent. Now, setTaskStates gets called after the state change and this was getting published.

For instance, an updateHook that did before

exception(CUSTOM);

would only publish CUSTOM while it is now doing CUSTOM, EXCEPTION. Even exception() would now publish EXCEPTION twice.

doudou commented 2 years ago

The new behavior does not seem to have bad effects ... let's keep it (it is cleaner), and see what happens.