Skip to content

Commit

Permalink
added change discussed in jonblack#22
Browse files Browse the repository at this point in the history
  • Loading branch information
LennartHennigs committed Apr 15, 2022
1 parent 9c98ea4 commit b440c9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "Fsm.h"

int State::_next_id = 0;

State::State(String name, CallbackFunction on_enter, CallbackFunction on_state, CallbackFunction on_exit) :
name(name),
on_enter(on_enter),
Expand Down Expand Up @@ -143,10 +143,10 @@ void Fsm::make_transition(Transition* transition) {
if (transition->on_transition != NULL) {
transition->on_transition();
}
m_current_state = transition->state_to;
if (transition->state_to->on_enter != NULL) {
transition->state_to->on_enter();
}
m_current_state = transition->state_to;

// Initialice all timed transitions from m_current_state
unsigned long now = millis();
Expand Down

0 comments on commit b440c9a

Please sign in to comment.