![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Fertige Version mit geschwindigkeit 100
Dependencies: mbed
Fork of Micromouse_alpha_copy_copy by
Drive.h@7:5ff551b098f8, 2018-05-02 (annotated)
- Committer:
- ruesipat
- Date:
- Wed May 02 11:53:42 2018 +0000
- Revision:
- 7:5ff551b098f8
- Parent:
- 5:b8b1a979b0d5
A
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 | 2:592f01278db4 | 6 | |
ruesipat | 1:d9e840c48b1e | 7 | #include "IRSensor.h" |
ruesipat | 1:d9e840c48b1e | 8 | #include "Controller.h" |
ruesipat | 1:d9e840c48b1e | 9 | #include "EncoderCounter.h" |
ruesipat | 1:d9e840c48b1e | 10 | #include "KontrastSensor.h" |
ruesipat | 1:d9e840c48b1e | 11 | |
ruesipat | 2:592f01278db4 | 12 | |
ruesipat | 1:d9e840c48b1e | 13 | class Drive |
ruesipat | 1:d9e840c48b1e | 14 | { |
ruesipat | 1:d9e840c48b1e | 15 | |
ruesipat | 1:d9e840c48b1e | 16 | public: |
ruesipat | 1:d9e840c48b1e | 17 | |
ruesipat | 4:e3f388933954 | 18 | Drive(KontrastSensor& kontrastSensor, EncoderCounter& counterLeft, EncoderCounter& counterRight, Controller& controller, IRSensor& irSensor0, IRSensor& irSensor1, IRSensor& irSensor2, IRSensor& irSensor3); |
ruesipat | 1:d9e840c48b1e | 19 | virtual ~Drive(); |
ruesipat | 1:d9e840c48b1e | 20 | void driving(); |
ruesipat | 1:d9e840c48b1e | 21 | private: |
ruesipat | 5:b8b1a979b0d5 | 22 | |
ruesipat | 5:b8b1a979b0d5 | 23 | static const float FRONTDISTANCE; |
ruesipat | 1:d9e840c48b1e | 24 | static const float DRIVINGSPEED; |
ruesipat | 1:d9e840c48b1e | 25 | static const int DRIVINGCOUNTS; |
TheDarkDurzo | 3:2ec7cf8bc3fc | 26 | |
ruesipat | 2:592f01278db4 | 27 | float difference; |
ruesipat | 1:d9e840c48b1e | 28 | |
ruesipat | 1:d9e840c48b1e | 29 | KontrastSensor& kontrastSensor; |
ruesipat | 2:592f01278db4 | 30 | |
ruesipat | 1:d9e840c48b1e | 31 | EncoderCounter& counterLeft; |
ruesipat | 1:d9e840c48b1e | 32 | EncoderCounter& counterRight; |
ruesipat | 2:592f01278db4 | 33 | |
ruesipat | 1:d9e840c48b1e | 34 | Controller& controller; |
ruesipat | 2:592f01278db4 | 35 | |
ruesipat | 4:e3f388933954 | 36 | IRSensor& irSensor0; |
ruesipat | 4:e3f388933954 | 37 | IRSensor& irSensor1; |
ruesipat | 4:e3f388933954 | 38 | IRSensor& irSensor2; |
ruesipat | 4:e3f388933954 | 39 | IRSensor& irSensor3; |
ruesipat | 2:592f01278db4 | 40 | |
ruesipat | 2:592f01278db4 | 41 | |
ruesipat | 1:d9e840c48b1e | 42 | |
ruesipat | 1:d9e840c48b1e | 43 | }; |
ruesipat | 1:d9e840c48b1e | 44 | |
ruesipat | 1:d9e840c48b1e | 45 | #endif /* DRIVE_H_ */ |