![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Version12.04.18
Fork of Micromouse_beta by
Drive.h@1:d9e840c48b1e, 2018-03-31 (annotated)
- Committer:
- ruesipat
- Date:
- Sat Mar 31 16:45:57 2018 +0000
- Revision:
- 1:d9e840c48b1e
- Child:
- 2:592f01278db4
j
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ruesipat | 1:d9e840c48b1e | 1 | #ifndef DRIVE_H_ |
ruesipat | 1:d9e840c48b1e | 2 | #define DRIVE_H_ |
ruesipat | 1:d9e840c48b1e | 3 | |
ruesipat | 1:d9e840c48b1e | 4 | #include <cstdlib> |
ruesipat | 1:d9e840c48b1e | 5 | #include <mbed.h> |
ruesipat | 1:d9e840c48b1e | 6 | #include "IRSensor.h" |
ruesipat | 1:d9e840c48b1e | 7 | #include "Controller.h" |
ruesipat | 1:d9e840c48b1e | 8 | #include "EncoderCounter.h" |
ruesipat | 1:d9e840c48b1e | 9 | #include "KontrastSensor.h" |
ruesipat | 1:d9e840c48b1e | 10 | |
ruesipat | 1:d9e840c48b1e | 11 | class Drive |
ruesipat | 1:d9e840c48b1e | 12 | { |
ruesipat | 1:d9e840c48b1e | 13 | |
ruesipat | 1:d9e840c48b1e | 14 | public: |
ruesipat | 1:d9e840c48b1e | 15 | |
ruesipat | 1:d9e840c48b1e | 16 | Drive(KontrastSensor& kontrastSensor, EncoderCounter& counterLeft, EncoderCounter& counterRight, Controller& controller, float distanceRight, float distanceFront, float distanceLeftFront); |
ruesipat | 1:d9e840c48b1e | 17 | virtual ~Drive(); |
ruesipat | 1:d9e840c48b1e | 18 | void driving(); |
ruesipat | 1:d9e840c48b1e | 19 | private: |
ruesipat | 1:d9e840c48b1e | 20 | |
ruesipat | 1:d9e840c48b1e | 21 | static const float DRIVINGSPEED; |
ruesipat | 1:d9e840c48b1e | 22 | static const int DRIVINGCOUNTS; |
ruesipat | 1:d9e840c48b1e | 23 | |
ruesipat | 1:d9e840c48b1e | 24 | KontrastSensor& kontrastSensor; |
ruesipat | 1:d9e840c48b1e | 25 | EncoderCounter& counterLeft; |
ruesipat | 1:d9e840c48b1e | 26 | EncoderCounter& counterRight; |
ruesipat | 1:d9e840c48b1e | 27 | Controller& controller; |
ruesipat | 1:d9e840c48b1e | 28 | float distanceRight; |
ruesipat | 1:d9e840c48b1e | 29 | float distanceFront; |
ruesipat | 1:d9e840c48b1e | 30 | float distanceLeftFront; |
ruesipat | 1:d9e840c48b1e | 31 | |
ruesipat | 1:d9e840c48b1e | 32 | }; |
ruesipat | 1:d9e840c48b1e | 33 | |
ruesipat | 1:d9e840c48b1e | 34 | #endif /* DRIVE_H_ */ |