![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
mit pathdingsbums
Dependencies: mbed
Fork of MicroMouse_MASTER_TWO by
Drive.h@4:e3f388933954, 2018-04-12 (annotated)
- Committer:
- ruesipat
- Date:
- Thu Apr 12 16:14:02 2018 +0000
- Revision:
- 4:e3f388933954
- Parent:
- 3:2ec7cf8bc3fc
- Child:
- 5:b8b1a979b0d5
Version12.04.18
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 | 1:d9e840c48b1e | 22 | |
ruesipat | 1:d9e840c48b1e | 23 | static const float DRIVINGSPEED; |
ruesipat | 1:d9e840c48b1e | 24 | static const int DRIVINGCOUNTS; |
TheDarkDurzo | 3:2ec7cf8bc3fc | 25 | |
ruesipat | 2:592f01278db4 | 26 | float difference; |
ruesipat | 1:d9e840c48b1e | 27 | |
ruesipat | 1:d9e840c48b1e | 28 | KontrastSensor& kontrastSensor; |
ruesipat | 2:592f01278db4 | 29 | |
ruesipat | 1:d9e840c48b1e | 30 | EncoderCounter& counterLeft; |
ruesipat | 1:d9e840c48b1e | 31 | EncoderCounter& counterRight; |
ruesipat | 2:592f01278db4 | 32 | |
ruesipat | 1:d9e840c48b1e | 33 | Controller& controller; |
ruesipat | 2:592f01278db4 | 34 | |
ruesipat | 4:e3f388933954 | 35 | IRSensor& irSensor0; |
ruesipat | 4:e3f388933954 | 36 | IRSensor& irSensor1; |
ruesipat | 4:e3f388933954 | 37 | IRSensor& irSensor2; |
ruesipat | 4:e3f388933954 | 38 | IRSensor& irSensor3; |
ruesipat | 2:592f01278db4 | 39 | |
ruesipat | 2:592f01278db4 | 40 | |
ruesipat | 1:d9e840c48b1e | 41 | |
ruesipat | 1:d9e840c48b1e | 42 | }; |
ruesipat | 1:d9e840c48b1e | 43 | |
ruesipat | 1:d9e840c48b1e | 44 | #endif /* DRIVE_H_ */ |