Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Roboshark_V9 by
Diff: Fahren.h
- Revision:
- 6:7bbcdd07bc2d
- Parent:
- 4:767fd282dd9c
- Child:
- 7:862d80e0ea2d
--- a/Fahren.h Thu Apr 26 05:58:07 2018 +0000 +++ b/Fahren.h Thu May 03 19:36:16 2018 +0000 @@ -1,29 +1,44 @@ +/*Roboshark V4 +Fahren.h +Erstellt: J. Blunschi +geändert: V.Ahlers +V.5.18 +*/ + + #ifndef FAHREN_H_ #define FAHREN_H_ #include <mbed.h> #include "EncoderCounter.h" #include "Controller.h" +#include "Regler.h" + class Fahren{ public: - Fahren(Controller& controller, EncoderCounter& counterLeft, EncoderCounter& counterRight); //Konstruktor + Fahren(Controller& controller, EncoderCounter& counterLeft, EncoderCounter& counterRight, Regler& regler); //Konstruktor virtual ~Fahren(); - void geradeaus(); + void geradeausU(); + void geradeausG(); void rechts90(); void rechts180(); void links90(); void ziel(); - void stopp(); + void stopp(); private: Controller& controller; EncoderCounter& counterLeft; EncoderCounter& counterRight; + Regler& regler; + Ticker ticker; + void getSpeed(); + //Variablen die in der Klasse Fahren verwendet werden double speedRight; @@ -34,6 +49,10 @@ short wegRechts; short stopRight; short stopLeft; + float SpeedR; + float SpeedL; + static const float PERIOD; + };