![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
mit pathdingsbums
Dependencies: mbed
Fork of MicroMouse_MASTER_TWO by
Turn.h@7:5ef09519a6e9, 2018-05-07 (annotated)
- Committer:
- ruesipat
- Date:
- Mon May 07 18:52:04 2018 +0000
- Revision:
- 7:5ef09519a6e9
- Parent:
- 1:d9e840c48b1e
- Child:
- 8:1c8a747c49c8
VERSION 7.5.18
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ruesipat | 1:d9e840c48b1e | 1 | #ifndef TURN_H_ |
ruesipat | 1:d9e840c48b1e | 2 | #define TURN_H_ |
ruesipat | 1:d9e840c48b1e | 3 | |
ruesipat | 1:d9e840c48b1e | 4 | #include <cstdlib> |
ruesipat | 1:d9e840c48b1e | 5 | #include <mbed.h> |
ruesipat | 1:d9e840c48b1e | 6 | #include "EncoderCounter.h" |
ruesipat | 1:d9e840c48b1e | 7 | #include "LowpassFilter.h" |
ruesipat | 1:d9e840c48b1e | 8 | #include "Controller.h" |
ruesipat | 1:d9e840c48b1e | 9 | |
ruesipat | 1:d9e840c48b1e | 10 | class Turn |
ruesipat | 1:d9e840c48b1e | 11 | { |
ruesipat | 1:d9e840c48b1e | 12 | |
ruesipat | 1:d9e840c48b1e | 13 | public: |
ruesipat | 1:d9e840c48b1e | 14 | |
ruesipat | 7:5ef09519a6e9 | 15 | Turn(EncoderCounter& counterLeft, EncoderCounter& counterRight, Controller& controller, int& wallRight, int& wallFront, int& wallLeft, int& dontStop); |
ruesipat | 1:d9e840c48b1e | 16 | |
ruesipat | 1:d9e840c48b1e | 17 | virtual ~Turn(); |
ruesipat | 1:d9e840c48b1e | 18 | void turning(); |
ruesipat | 1:d9e840c48b1e | 19 | |
ruesipat | 1:d9e840c48b1e | 20 | private: |
ruesipat | 1:d9e840c48b1e | 21 | |
ruesipat | 1:d9e840c48b1e | 22 | static const float TURNINGSPEED; |
ruesipat | 1:d9e840c48b1e | 23 | static const int TURNINGCOUNTS; |
ruesipat | 1:d9e840c48b1e | 24 | |
ruesipat | 1:d9e840c48b1e | 25 | EncoderCounter& counterLeft; |
ruesipat | 1:d9e840c48b1e | 26 | EncoderCounter& counterRight; |
ruesipat | 1:d9e840c48b1e | 27 | Controller& controller; |
ruesipat | 1:d9e840c48b1e | 28 | int& wallRight; |
ruesipat | 1:d9e840c48b1e | 29 | int& wallFront; |
ruesipat | 1:d9e840c48b1e | 30 | int& wallLeft; |
ruesipat | 7:5ef09519a6e9 | 31 | int& dontStop; |
ruesipat | 1:d9e840c48b1e | 32 | }; |
ruesipat | 1:d9e840c48b1e | 33 | |
ruesipat | 1:d9e840c48b1e | 34 | #endif /* TURN_H_ */ |