first lib
Dependents: 17robo_fuzi 17robo_tokyo_kaede
event_var.cpp
- Committer:
- echo_piyo
- Date:
- 2017-10-22
- Revision:
- 1:0643baecf9e9
- Parent:
- 0:c5f25a970069
File content as of revision 1:0643baecf9e9:
#include "event_var.h" void eventVar::input(int inputState) { valState = ((valState<<1)|inputState)&3; if(valState == 1) { riseState = 1; fallState = 0; } else if(valState == 2){ riseState = 0; fallState = 1; } else { riseState = 0; fallState = 0; } } int eventVar::getRise(){ return riseState; } int eventVar::getFall(){ return fallState; }