49 lines
838 B
C++
49 lines
838 B
C++
|
#include "lfr_states.h"
|
||
|
|
||
|
void State::Idle::enter(LFR_StateMachine* stateMachine)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
void State::Idle::exit(LFR_StateMachine* stateMachine)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
LFR_IState& State::Idle::getInstance()
|
||
|
{
|
||
|
static State::Idle singleton;
|
||
|
return singleton;
|
||
|
}
|
||
|
|
||
|
void State::Autonomous::enter(LFR_StateMachine* stateMachine)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
void State::Autonomous::exit(LFR_StateMachine* stateMachine)
|
||
|
{
|
||
|
stateMachine->setState(State::Idle::getInstance());
|
||
|
}
|
||
|
|
||
|
LFR_IState& State::Autonomous::getInstance()
|
||
|
{
|
||
|
static State::Autonomous singleton;
|
||
|
return singleton;
|
||
|
}
|
||
|
|
||
|
void State::Manual::enter(LFR_StateMachine* stateMachine)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
void State::Manual::exit(LFR_StateMachine* stateMachine)
|
||
|
{
|
||
|
stateMachine->setState(State::Idle::getInstance());
|
||
|
}
|
||
|
|
||
|
LFR_IState& State::Manual::getInstance()
|
||
|
{
|
||
|
static State::Manual singleton;
|
||
|
return singleton;
|
||
|
}
|