diff --git a/Tacos/src/statemachine.cpp b/Tacos/src/statemachine.cpp index a3b0227..a5c4609 100644 --- a/Tacos/src/statemachine.cpp +++ b/Tacos/src/statemachine.cpp @@ -72,8 +72,9 @@ namespace sta transition.event = EventFlags::NORMAL; transition.lockout = lockout; - // TODO: For how should we wait here? - queue_.put(transition); + // Try to add a state transition request to the queue. Don't wait if another + // thread is already requesting a state change. + queue_.put(transition, 0); } void Statemachine::requestTimedStateTransition(uint32_t from, uint32_t to, uint32_t millis, uint32_t lockout /* = 0 */)