Transition smach to same final state
Hi all, I want to execute a self transition in which the initial state is same as the final state STATE_A -----> STATE_A However, when the smach.execute() is called, it continuously executes the transition in an infinite loop. My main main condition is that I need to do a self transition.
Please suggest any suitable techniques to do so. Thanks and Cheers !!
Not sure what you are trying to do. If you at the end enter STATE_A again with the same input data as the first time, wouldn't you expect the state machine execution to loop forever?
Hi @knxa. The problem I am facing need to have a self transition from initial state A to final state A. But behaviour of initial state A is different to final state A. I wish to use the concept of entry and exit actions to create behaviour for transitions and not states.
Hope I was able to explain.
I think I believe I agree with @knxa: if the behaviour is different, why are you trying to reuse the state?
Hi @gvdhoorn, I see what you are saying, but I want to reuse the state but with a different action behaviour. E.g. A->B is a transition T1 having some actions, while A->A is another transition T2 with a different action. I want to associate the behaviour with the transition not the state.