init

Dependencies:   MPU6050 PinDetect circular_buffer

CaseFSM/DeviceFull.cpp

Committer:
OsmanKameric
Date:
2017-11-07
Revision:
0:b416214256cd

File content as of revision 0:b416214256cd:

#include <DeviceEmpty.h>
#include <DeviceFull.h>
#include <CaseFsm.h>



DeviceFull::DeviceFull(CaseFsmStates& states, Timer& timer) : CaseState(states,timer)
{
}

CaseState* DeviceFull::handle(SwitchPosition& event)
{
    printf("Odoh u DEVICE EMPTY STATE\r\n");
    return states_.deviceEmptyState();
}



CaseState* DeviceFull::handle(RFIDEvent& event)
{
    //printf("%d\r\n",event.cardType);
    //for(int i=0;i<event.size;i++){
      //  printf(" %X",event.uid[i]);
       // }
    //printf("\r\n");
    if(5!=5) {
        printf("Odoh u PHONE UNDETECTED STATE\r\n");
        return states_.phoneUndetectedState();
    } else {
        printf("Odoh u PHONE DETECTED STATE\r\n");
        return states_.phoneDetectedState();
    }
}
CaseState* DeviceFull::handle(TimerEnd& event)
{
    printf("Odoh u DEVICE UNDETECTED STATE\r\n");
    return states_.phoneUndetectedState();
}