mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-06 09:37:34 +00:00
cleanup: separate functions for requesting and forcing state transitions, fix publishing behavior
This commit is contained in:
@@ -41,11 +41,23 @@ namespace sta
|
||||
* @param from The start we want to transition from.
|
||||
* @param to The state we want to transition to.
|
||||
* @param lockout An optional timer blocking state transition for a given time.
|
||||
* @param force If true, the state transition will be executed regardless of the current state.
|
||||
* @param publish If true, the state transition will be published via CAN.
|
||||
*
|
||||
* @ingroup tacos_api
|
||||
*/
|
||||
void setState(uint32_t from, uint32_t to, uint32_t lockout = 0, bool force = false, bool publish = false);
|
||||
void requestState(uint32_t from, uint32_t to, uint32_t lockout = 0, bool publish = true);
|
||||
|
||||
/**
|
||||
* @brief Request a state transition. Invalid state transitions will be dismissed.
|
||||
*
|
||||
* @param from The start we want to transition from.
|
||||
* @param to The state we want to transition to.
|
||||
* @param lockout An optional timer blocking state transition for a given time.
|
||||
* @param publish If true, the state transition will be published via CAN.
|
||||
*
|
||||
* @ingroup tacos_api
|
||||
*/
|
||||
void forceState(uint32_t from, uint32_t to, uint32_t lockout = 0, bool publish = true);
|
||||
|
||||
/**
|
||||
* @brief Request a state transition after a given time has passed. Invalid state transitions will be dismissed.
|
||||
|
Reference in New Issue
Block a user