init
Dependencies: MPU6050 PinDetect circular_buffer
CaseFSM/DeviceFull.cpp@0:b416214256cd, 2017-11-07 (annotated)
- Committer:
- OsmanKameric
- Date:
- Tue Nov 07 16:35:14 2017 +0000
- Revision:
- 0:b416214256cd
FIRST
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
OsmanKameric | 0:b416214256cd | 1 | #include <DeviceEmpty.h> |
OsmanKameric | 0:b416214256cd | 2 | #include <DeviceFull.h> |
OsmanKameric | 0:b416214256cd | 3 | #include <CaseFsm.h> |
OsmanKameric | 0:b416214256cd | 4 | |
OsmanKameric | 0:b416214256cd | 5 | |
OsmanKameric | 0:b416214256cd | 6 | |
OsmanKameric | 0:b416214256cd | 7 | DeviceFull::DeviceFull(CaseFsmStates& states, Timer& timer) : CaseState(states,timer) |
OsmanKameric | 0:b416214256cd | 8 | { |
OsmanKameric | 0:b416214256cd | 9 | } |
OsmanKameric | 0:b416214256cd | 10 | |
OsmanKameric | 0:b416214256cd | 11 | CaseState* DeviceFull::handle(SwitchPosition& event) |
OsmanKameric | 0:b416214256cd | 12 | { |
OsmanKameric | 0:b416214256cd | 13 | printf("Odoh u DEVICE EMPTY STATE\r\n"); |
OsmanKameric | 0:b416214256cd | 14 | return states_.deviceEmptyState(); |
OsmanKameric | 0:b416214256cd | 15 | } |
OsmanKameric | 0:b416214256cd | 16 | |
OsmanKameric | 0:b416214256cd | 17 | |
OsmanKameric | 0:b416214256cd | 18 | |
OsmanKameric | 0:b416214256cd | 19 | CaseState* DeviceFull::handle(RFIDEvent& event) |
OsmanKameric | 0:b416214256cd | 20 | { |
OsmanKameric | 0:b416214256cd | 21 | //printf("%d\r\n",event.cardType); |
OsmanKameric | 0:b416214256cd | 22 | //for(int i=0;i<event.size;i++){ |
OsmanKameric | 0:b416214256cd | 23 | // printf(" %X",event.uid[i]); |
OsmanKameric | 0:b416214256cd | 24 | // } |
OsmanKameric | 0:b416214256cd | 25 | //printf("\r\n"); |
OsmanKameric | 0:b416214256cd | 26 | if(5!=5) { |
OsmanKameric | 0:b416214256cd | 27 | printf("Odoh u PHONE UNDETECTED STATE\r\n"); |
OsmanKameric | 0:b416214256cd | 28 | return states_.phoneUndetectedState(); |
OsmanKameric | 0:b416214256cd | 29 | } else { |
OsmanKameric | 0:b416214256cd | 30 | printf("Odoh u PHONE DETECTED STATE\r\n"); |
OsmanKameric | 0:b416214256cd | 31 | return states_.phoneDetectedState(); |
OsmanKameric | 0:b416214256cd | 32 | } |
OsmanKameric | 0:b416214256cd | 33 | } |
OsmanKameric | 0:b416214256cd | 34 | CaseState* DeviceFull::handle(TimerEnd& event) |
OsmanKameric | 0:b416214256cd | 35 | { |
OsmanKameric | 0:b416214256cd | 36 | printf("Odoh u DEVICE UNDETECTED STATE\r\n"); |
OsmanKameric | 0:b416214256cd | 37 | return states_.phoneUndetectedState(); |
OsmanKameric | 0:b416214256cd | 38 | } |
OsmanKameric | 0:b416214256cd | 39 | |
OsmanKameric | 0:b416214256cd | 40 |