commit

Dependencies:   MPU6050_SIM5320_TEST

Fork of MPU_SDCARD by Suad Suljic

Revision:
1:75966605a6a3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MotionFSM/Fsm.cpp	Fri Nov 10 15:35:26 2017 +0000
@@ -0,0 +1,45 @@
+#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_()
+{
+
+
+}
+
+
+