![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ライブラリ化を行った後
Dependencies: QEI accelerator bit_test cyclic_io cyclic_var cylinder event_var limit mbed mecanum motor_drive pid pid_encoder rs422_put sbdbt servo
Fork of 17robo_Practice1 by
cyclic.h@32:f535ace7c529, 2017-08-29 (annotated)
- Committer:
- echo_piyo
- Date:
- Tue Aug 29 03:01:50 2017 +0000
- Revision:
- 32:f535ace7c529
- Parent:
- 14:aac2f18f6779
(?)????????PID???; ???
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
echo_piyo | 14:aac2f18f6779 | 1 | class Cyclic |
echo_piyo | 14:aac2f18f6779 | 2 | { |
echo_piyo | 14:aac2f18f6779 | 3 | public: |
echo_piyo | 14:aac2f18f6779 | 4 | void cyclic(int state_in) |
echo_piyo | 14:aac2f18f6779 | 5 | { |
echo_piyo | 14:aac2f18f6779 | 6 | if(state_in) |
echo_piyo | 14:aac2f18f6779 | 7 | { |
echo_piyo | 14:aac2f18f6779 | 8 | if(flag == false) |
echo_piyo | 14:aac2f18f6779 | 9 | { |
echo_piyo | 32:f535ace7c529 | 10 | state = !state; |
echo_piyo | 14:aac2f18f6779 | 11 | } |
echo_piyo | 14:aac2f18f6779 | 12 | flag = true; |
echo_piyo | 14:aac2f18f6779 | 13 | } |
echo_piyo | 14:aac2f18f6779 | 14 | else flag = false; |
echo_piyo | 14:aac2f18f6779 | 15 | } |
echo_piyo | 14:aac2f18f6779 | 16 | |
echo_piyo | 14:aac2f18f6779 | 17 | int getState() |
echo_piyo | 14:aac2f18f6779 | 18 | { |
echo_piyo | 14:aac2f18f6779 | 19 | return state; |
echo_piyo | 14:aac2f18f6779 | 20 | } |
echo_piyo | 14:aac2f18f6779 | 21 | |
echo_piyo | 14:aac2f18f6779 | 22 | private: |
echo_piyo | 14:aac2f18f6779 | 23 | bool flag; |
echo_piyo | 14:aac2f18f6779 | 24 | bool state; |
echo_piyo | 14:aac2f18f6779 | 25 | }; |