first
Dependents: 17robo_fuzi 17robo_tokyo_kaede
Diff: cyclic_var.cpp
- Revision:
- 0:2cff474c9122
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cyclic_var.cpp Wed Sep 20 07:09:40 2017 +0000 @@ -0,0 +1,15 @@ +#include "cyclic_var.h" +#include "mbed.h" + +void CyclicVar::cyclic(int state_in){ + if(state_in) { + if(flag == false) { + state = !state; + } + flag = true; + } else flag = false; +} + +int CyclicVar::getState(){ + return state; +} \ No newline at end of file