first
Dependents: 17robo_fuzi 17robo_tokyo_kaede
cyclic_var.cpp@0:2cff474c9122, 2017-09-20 (annotated)
- Committer:
- echo_piyo
- Date:
- Wed Sep 20 07:09:40 2017 +0000
- Revision:
- 0:2cff474c9122
1??
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
echo_piyo | 0:2cff474c9122 | 1 | #include "cyclic_var.h" |
echo_piyo | 0:2cff474c9122 | 2 | #include "mbed.h" |
echo_piyo | 0:2cff474c9122 | 3 | |
echo_piyo | 0:2cff474c9122 | 4 | void CyclicVar::cyclic(int state_in){ |
echo_piyo | 0:2cff474c9122 | 5 | if(state_in) { |
echo_piyo | 0:2cff474c9122 | 6 | if(flag == false) { |
echo_piyo | 0:2cff474c9122 | 7 | state = !state; |
echo_piyo | 0:2cff474c9122 | 8 | } |
echo_piyo | 0:2cff474c9122 | 9 | flag = true; |
echo_piyo | 0:2cff474c9122 | 10 | } else flag = false; |
echo_piyo | 0:2cff474c9122 | 11 | } |
echo_piyo | 0:2cff474c9122 | 12 | |
echo_piyo | 0:2cff474c9122 | 13 | int CyclicVar::getState(){ |
echo_piyo | 0:2cff474c9122 | 14 | return state; |
echo_piyo | 0:2cff474c9122 | 15 | } |