digint/tinyfsm

How Can I trace the previous state?

chenkan0104 opened this issue · 2 comments

Hello, Is there any elegant solution to trace the previous state?
Sometimes this demand is reasonable.

It's been quite a while since I last used tinyfsm, but enabling the DBG statements (e.g. here used to help a lot for tracing what is going on.

Or perhaps you might want to store some last_state before changing current_state somewhere here.

PS sorry for the late reply, the mails for this (old) repo went to the wrong folder...

I saved last_state outside class Fsm and it works, thanks anyway!