#682 hfsm::start() does not update state for call_on_enter_state = true

This commit is contained in:
John Wellbelove 2023-05-01 10:10:14 +01:00
parent 963e39f716
commit 478c954b31

View File

@ -65,16 +65,13 @@ namespace etl
ETL_ASSERT(p_state != ETL_NULLPTR, ETL_ERROR(etl::fsm_null_state_exception));
if (call_on_enter_state)
{
do_enters(ETL_NULLPTR, p_state, true);
{
etl::fsm_state_id_t next_state = do_enters(ETL_NULLPTR, p_state, true);
//etl::fsm_state_id_t next_state = do_enters(ETL_NULLPTR, p_state, true);
//if (ifsm_state::No_State_Change != next_state)
//{
// p_state = state_list[next_state];
//}
if (next_state != ifsm_state::No_State_Change)
{
p_state = state_list[next_state];
}
}
}
}