commit_cell_locker

Dependencies:   MPU6050_SIM5320_TEST

Fork of KOPIRANO_cell_locker by Suad Suljic

MotionFSM/Fsm.cpp

Committer:
suads
Date:
2017-11-13
Revision:
2:aabc92901e25
Parent:
1:75966605a6a3

File content as of revision 2:aabc92901e25:

#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_()
{


}