mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-06-10 16:45:59 +00:00
Cleaned up compiler errors that I missed somehow.
This commit is contained in:
parent
098ef140a6
commit
59b1005590
@ -1 +1 @@
|
||||
Subproject commit 0e96b2ec29fde1e56e12fc9f0dceb80012e0caf3
|
||||
Subproject commit c609dc81cc70327948aa8173c9d6ad804ae7a642
|
@ -80,7 +80,7 @@ namespace sta
|
||||
|
||||
void Manager::func()
|
||||
{
|
||||
Statemachine::stateChangeEvent.wait(Statemachine::EventFlags::ALL, osWaitForever);
|
||||
Statemachine::stateChangeEvent.wait(EventFlags::ALL, osWaitForever);
|
||||
|
||||
HeapStats_t stats;
|
||||
vPortGetHeapStats(&stats);
|
||||
|
@ -17,11 +17,8 @@ namespace sta
|
||||
Statemachine::Statemachine()
|
||||
: TacosThread{"Statemachine", STA_TACOS_STATEMACHINE_PRIORITY},
|
||||
currentState_{STA_TACOS_INITIAL_STATE},
|
||||
failsafeState_{STA_TACOS_INITIAL_STATE},
|
||||
lockoutTimer_{[](void *){}, nullptr},
|
||||
failsafeTimer_{[](void *){}, nullptr},
|
||||
transitionFunc_{[](uint16_t) -> uint16_t { return Statemachine::instance()->getCurrentState(); }},
|
||||
timerFunc_{[](uint16_t, uint16_t, uint16_t) {}},
|
||||
queue_{STA_TACOS_STATEMACHINE_QUEUE_LENGTH}
|
||||
{
|
||||
STA_ASSERT(STA_TACOS_INITIAL_STATE < STA_TACOS_NUM_STATES);
|
||||
@ -29,7 +26,7 @@ namespace sta
|
||||
|
||||
void Statemachine::init()
|
||||
{
|
||||
timerFunc_(0, 0, EventFlags::STARTUP);
|
||||
|
||||
}
|
||||
|
||||
void Statemachine::func()
|
||||
@ -55,18 +52,10 @@ namespace sta
|
||||
}
|
||||
|
||||
// Start the lockout timer if requested.
|
||||
if (transition.lockout != NULL)
|
||||
if (transition.lockout != 0)
|
||||
{
|
||||
setLockoutTimer(transition.lockout);
|
||||
}
|
||||
|
||||
// Start the failsafe timer if requested.
|
||||
if (transition.failsafe != NULL)
|
||||
{
|
||||
std::tie(millis, state) = transition.failsafe;
|
||||
|
||||
setFailsafeTimer(millis, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,12 +78,12 @@ namespace sta
|
||||
|
||||
void Statemachine::requestTimedStateTransition(uint32_t from, uint32_t to, uint32_t millis, uint32_t lockout /* = 0 */)
|
||||
{
|
||||
STA_ASSERT(nextState < STA_TACOS_NUM_STATES);
|
||||
STA_ASSERT(to < STA_TACOS_NUM_STATES);
|
||||
STA_ASSERT(!failsafeTimer_.isRunning());
|
||||
|
||||
failsafeTimer_.setCallback([from, to, lockout](void* arg) {
|
||||
Statemachine::requestStateTransition(from, to, lockout);
|
||||
}, &failsafeState_);
|
||||
Statemachine::instance()->requestStateTransition(from, to, lockout);
|
||||
}, NULL);
|
||||
|
||||
failsafeTimer_.start(millis);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user