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
Revision 11:474ad54d2595, committed 2018-05-08
- Comitter:
- ahlervin
- Date:
- Tue May 08 09:22:32 2018 +0000
- Parent:
- 10:fb2195d0de0f
- Child:
- 12:cd07a80f0a9a
- Commit message:
- Kommt ins Ziel
Changed in this revision
Fahren.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Fahren.cpp Tue May 08 09:07:37 2018 +0000 +++ b/Fahren.cpp Tue May 08 09:22:32 2018 +0000 @@ -17,8 +17,8 @@ //Konstruktor Fahren::Fahren(Controller& controller, EncoderCounter& counterLeft, EncoderCounter& counterRight, IRSensor& iRSensor): controller(controller), counterLeft(counterLeft), counterRight(counterRight), iRSensor (iRSensor){ -SpeedR = 80.0f; -SpeedL = 80.0f; +SpeedR = 90.0f; +SpeedL = 90.0f; disF = 0.0f; //ticker.attach(callback(this, &Fahren::reset), PERIOD); } @@ -50,9 +50,9 @@ reglerEinL = 1; while(1){ - float diff = (iRSensor.readR() - iRSensor.readL())*0.9f; //Regler - if(iRSensor.readR()>60.0f) diff=0; - if(iRSensor.readL()>60.0f) diff=0; + float diff = (iRSensor.readR() - iRSensor.readL())*0.95f; //Regler + if(iRSensor.readR()>80.0f) diff=0; + if(iRSensor.readL()>80.0f) diff=0; //printf("diff =%f \n",diff); controller.setDesiredSpeedRight(SpeedR+diff); controller.setDesiredSpeedLeft(-(SpeedL-diff));