Skip to content

Commit

Permalink
setting validated to false when changing start state
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Nov 4, 2024
1 parent 691496f commit 4f4af19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions yasmin/src/yasmin/state_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ void StateMachine::set_start_state(std::string state_name) {
YASMIN_LOG_DEBUG("Setting start state to '%s'", state_name.c_str());

this->start_state = state_name;

// Mark state machine as no validated
this->validated.store(false);
}

std::string StateMachine::get_start_state() { return this->start_state; }
Expand Down Expand Up @@ -354,8 +357,7 @@ std::string StateMachine::execute() {
std::shared_ptr<blackboard::Blackboard> blackboard =
std::make_shared<blackboard::Blackboard>();

std::string outcome = this->operator()(blackboard);
return outcome;
return this->operator()(blackboard);
}

std::string StateMachine::operator()() {
Expand Down
3 changes: 3 additions & 0 deletions yasmin/yasmin/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ def set_start_state(self, state_name: str) -> None:

self._start_state: str = state_name

## Mark state machine as no validated
self._validated = False

def get_start_state(self) -> str:
"""
Retrieves the name of the current starting state.
Expand Down

0 comments on commit 4f4af19

Please sign in to comment.