diff --git a/src/statemachine.cpp b/src/statemachine.cpp index 03c5f51..e84c614 100644 --- a/src/statemachine.cpp +++ b/src/statemachine.cpp @@ -130,6 +130,16 @@ namespace sta { setLockoutTimer(lockout); } + + // get heap stats at the end of the state transition + HeapStats_t stats; + vPortGetHeapStats(&stats); + + // Execute the user-defined callback. + sta::tacos::onStateTransition(transition.from, transition.to, transition.lockout); + + // Start all new tasks and stop all the tasks that aren't supposed to be running. + updateThreads(); } }