taiyou komazawa
/
Nucleo_fliping_arm
2018 HongoMechaTech A
lib/QEI.h@0:e83b840a5f86, 2018-09-18 (annotated)
- Committer:
- Komazawa_sun
- Date:
- Tue Sep 18 03:11:01 2018 +0000
- Revision:
- 0:e83b840a5f86
????????????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Komazawa_sun | 0:e83b840a5f86 | 1 | #ifndef MBED_QEI |
Komazawa_sun | 0:e83b840a5f86 | 2 | #define MBED_QEI |
Komazawa_sun | 0:e83b840a5f86 | 3 | #include "mbed.h" |
Komazawa_sun | 0:e83b840a5f86 | 4 | #include "Angle.h" |
Komazawa_sun | 0:e83b840a5f86 | 5 | |
Komazawa_sun | 0:e83b840a5f86 | 6 | class QEI : public Angle{ |
Komazawa_sun | 0:e83b840a5f86 | 7 | public: |
Komazawa_sun | 0:e83b840a5f86 | 8 | QEI(PinName A, PinName B, int pulses, float t); |
Komazawa_sun | 0:e83b840a5f86 | 9 | virtual double read(); |
Komazawa_sun | 0:e83b840a5f86 | 10 | virtual void reset(); |
Komazawa_sun | 0:e83b840a5f86 | 11 | void RevorutionCounter(); |
Komazawa_sun | 0:e83b840a5f86 | 12 | float over_angle(); |
Komazawa_sun | 0:e83b840a5f86 | 13 | int over_count(); |
Komazawa_sun | 0:e83b840a5f86 | 14 | int count(); |
Komazawa_sun | 0:e83b840a5f86 | 15 | int revolution(); |
Komazawa_sun | 0:e83b840a5f86 | 16 | float angle(); |
Komazawa_sun | 0:e83b840a5f86 | 17 | float acceleration(); |
Komazawa_sun | 0:e83b840a5f86 | 18 | float speed(); |
Komazawa_sun | 0:e83b840a5f86 | 19 | protected: |
Komazawa_sun | 0:e83b840a5f86 | 20 | int pulses_; |
Komazawa_sun | 0:e83b840a5f86 | 21 | private: |
Komazawa_sun | 0:e83b840a5f86 | 22 | Ticker x_; |
Komazawa_sun | 0:e83b840a5f86 | 23 | InterruptIn A_, B_; |
Komazawa_sun | 0:e83b840a5f86 | 24 | int count_; |
Komazawa_sun | 0:e83b840a5f86 | 25 | int over_count_; |
Komazawa_sun | 0:e83b840a5f86 | 26 | int32_t oldcount_; |
Komazawa_sun | 0:e83b840a5f86 | 27 | int revolutions_; |
Komazawa_sun | 0:e83b840a5f86 | 28 | float speed_; |
Komazawa_sun | 0:e83b840a5f86 | 29 | float oldspeed_; |
Komazawa_sun | 0:e83b840a5f86 | 30 | float acceleration_; |
Komazawa_sun | 0:e83b840a5f86 | 31 | float t_; |
Komazawa_sun | 0:e83b840a5f86 | 32 | |
Komazawa_sun | 0:e83b840a5f86 | 33 | void _AR(); |
Komazawa_sun | 0:e83b840a5f86 | 34 | void _AF(); |
Komazawa_sun | 0:e83b840a5f86 | 35 | void _BR(); |
Komazawa_sun | 0:e83b840a5f86 | 36 | void _BF(); |
Komazawa_sun | 0:e83b840a5f86 | 37 | void _sa(); |
Komazawa_sun | 0:e83b840a5f86 | 38 | }; |
Komazawa_sun | 0:e83b840a5f86 | 39 | |
Komazawa_sun | 0:e83b840a5f86 | 40 | #endif |