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 MicroMouse_MASTER_FOUR by
Diff: Drive.cpp
- Revision:
- 6:a09d2ee3b82e
- Parent:
- 5:b8b1a979b0d5
- Child:
- 7:5ef09519a6e9
--- a/Drive.cpp Wed Apr 25 12:07:03 2018 +0000
+++ b/Drive.cpp Wed Apr 25 12:49:48 2018 +0000
@@ -8,7 +8,7 @@
using namespace std;
const float Drive::FRONTDISTANCE = 62.0f; //Abstand Sensor zur VorderWand //DONT TOUCH
-const float Drive::DRIVINGSPEED = 100.0f;//Fahrgeschwindigkeit Drehzahl in [rpm]
+const float Drive::DRIVINGSPEED = 50.0f;//Fahrgeschwindigkeit Drehzahl in [rpm]
const int Drive::DRIVINGCOUNTS = 1773; //Entspricht Strecke von 20cm //DONT TOUCH
Drive::Drive(KontrastSensor& kontrastSensor, EncoderCounter& counterLeft, EncoderCounter& counterRight, Controller& controller, IRSensor& irSensor0, IRSensor& irSensor1, IRSensor& irSensor2, IRSensor& irSensor3):
@@ -65,7 +65,7 @@
while(((countsRight <= countsRight0 + DRIVINGCOUNTS) || (countsLeft >= countsLeft0 - DRIVINGCOUNTS)) && (drive == 1) ) {
- //kontrastSensor.check();
+ kontrastSensor.check();
countsRight = counterRight.read();
countsLeft = counterLeft.read();
controller.setDesiredSpeedRight(DRIVINGSPEED - correction - slowdown); //Korrektur passt Geschwindigkeit an beiden Raedern an
@@ -135,7 +135,7 @@
}//Ende Whileschleife Drive...
- controller.setDesiredSpeedRight(0.0f);
- controller.setDesiredSpeedLeft(0.0f);
+ controller.setDesiredSpeedRight(0.5f); //0.0f
+ controller.setDesiredSpeedLeft(0.5f); //0.0f
}
