init
Dependencies: MPU6050 PinDetect circular_buffer
Diff: CaseFSM/DeviceFull.cpp
- Revision:
- 0:b416214256cd
diff -r 000000000000 -r b416214256cd CaseFSM/DeviceFull.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CaseFSM/DeviceFull.cpp Tue Nov 07 16:35:14 2017 +0000 @@ -0,0 +1,40 @@ +#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(); +} + +