譯文 張
/
BX-car
good
Fork of BX-car by
motor_api.h@11:ffd762ae141b, 2014-06-25 (annotated)
- Committer:
- even
- Date:
- Wed Jun 25 05:59:29 2014 +0000
- Revision:
- 11:ffd762ae141b
- Parent:
- 1:82bc25a7b68b
1st PID complete
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
backman | 1:82bc25a7b68b | 1 | #include "mbed.h" |
backman | 1:82bc25a7b68b | 2 | |
backman | 1:82bc25a7b68b | 3 | |
backman | 1:82bc25a7b68b | 4 | class BX_motor{ |
backman | 1:82bc25a7b68b | 5 | |
backman | 1:82bc25a7b68b | 6 | public: |
backman | 1:82bc25a7b68b | 7 | |
backman | 1:82bc25a7b68b | 8 | BX_motor(char type); |
backman | 1:82bc25a7b68b | 9 | |
backman | 1:82bc25a7b68b | 10 | |
backman | 1:82bc25a7b68b | 11 | |
backman | 1:82bc25a7b68b | 12 | void rotate(float level); |
backman | 1:82bc25a7b68b | 13 | |
backman | 1:82bc25a7b68b | 14 | |
backman | 1:82bc25a7b68b | 15 | |
backman | 1:82bc25a7b68b | 16 | private: |
backman | 1:82bc25a7b68b | 17 | |
backman | 1:82bc25a7b68b | 18 | float Level; |
backman | 1:82bc25a7b68b | 19 | |
backman | 1:82bc25a7b68b | 20 | char Type; |
backman | 1:82bc25a7b68b | 21 | |
backman | 1:82bc25a7b68b | 22 | PwmOut* forward_A; |
backman | 1:82bc25a7b68b | 23 | PwmOut* backward_A; |
backman | 1:82bc25a7b68b | 24 | |
backman | 1:82bc25a7b68b | 25 | PwmOut* forward_B; |
backman | 1:82bc25a7b68b | 26 | PwmOut* backward_B; |
backman | 1:82bc25a7b68b | 27 | |
backman | 1:82bc25a7b68b | 28 | |
backman | 1:82bc25a7b68b | 29 | DigitalOut* engine_enable; |
backman | 1:82bc25a7b68b | 30 | |
backman | 1:82bc25a7b68b | 31 | |
backman | 1:82bc25a7b68b | 32 | |
backman | 1:82bc25a7b68b | 33 | }; |