sampleProgram
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_fuzi by
headerfile_unuse/cyclic_.h@76:03475cafb326, 2017-10-22 (annotated)
- Committer:
- echo_piyo
- Date:
- Sun Oct 22 11:26:25 2017 +0000
- Revision:
- 76:03475cafb326
- Parent:
- 66:1664ee92539d
(??)????shoulderCalclation???controllerEvent???output?????; ????????????
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 | }; |