Dependents: Motorino_Lib xxx_Motorino_Lib
Revision 4:be7221f0390c, committed 2021-10-27
- Comitter:
- jack1930
- Date:
- Wed Oct 27 16:34:36 2021 +0000
- Parent:
- 3:d53e45e1acae
- Commit message:
- Erster Fertigzustand
Changed in this revision
Kanal.cpp | Show annotated file Show diff for this revision Revisions of this file |
Kanal.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Kanal.cpp Tue Sep 28 15:54:12 2021 +0000 +++ b/Kanal.cpp Wed Oct 27 16:34:36 2021 +0000 @@ -23,7 +23,7 @@ { w_alt+=dw; //printf("w alt %d zyklen %d\r\n",(int)w_alt,zyklen); - meinMotorino->servo(w_alt,nr); //pos 0..180° + meinMotorino->servo(w_alt,nr,start,end); //pos 0..180° ThisThread::sleep_for(25ms); } meinMotorino->servo(w_ziel,nr,start,end); //pos 0..180° @@ -47,6 +47,12 @@ } +void Kanal::grundstellung(float w) +{ + meinMotorino->servo(w,nr,start,end); //pos 0..180° + w_alt=w; +} + bool Kanal::isBusy() { //if (busy==false) Bewegung.terminate();
--- a/Kanal.h Tue Sep 28 15:54:12 2021 +0000 +++ b/Kanal.h Wed Oct 27 16:34:36 2021 +0000 @@ -28,7 +28,7 @@ float dw; int zyklen; bool busy=false; - float start=5, end=10; + float start=2, end=12.5; public: /** Create Kanal Instance @param nr 0..15 Kanalnummer @@ -40,6 +40,7 @@ @param zeit: Zeit für die Bewegung in ms */ void go(float w, int zeit); + void grundstellung(float w); void fahre(); /** Abfrage, ob die Bewegung läuft */