Suad Suljic / Mbed OS Cell_lockker

Dependencies:   MPU6050_SIM5320_TEST

MotionFSM/Fsm.cpp

Committer:
suads
Date:
2017-11-09
Revision:
0:79959cf2cc3e

File content as of revision 0:79959cf2cc3e:

#include <Moving.h>
#include <Stacionary.h>
#include <Fsm.h>

FsmStates::FsmStates() : movingState_(new Moving(*this,timer)),
    stacionaryState_(new Stacionary(*this,timer))
{
    currentState(stacionaryState());
}



State* FsmStates::stacionaryState()
{
    return stacionaryState_;
}

State* FsmStates::movingState()
{
    return movingState_;
}

State* FsmStates::currentState()
{
    return currentState_;
}
void FsmStates::currentState(State* state)
{
    currentState_ = state;
}

FsmStates::~FsmStates()
{
    delete stacionaryState_;
    delete movingState_;
}

Fsm::Fsm() : states_()
{


}