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.
Fork of Versuch20 by
Diff: Classes/Spurhaltung.cpp
- Revision:
- 3:f44ef28cfb2d
- Parent:
- 2:efa9a78591da
- Child:
- 5:64d7b4b69fdf
--- a/Classes/Spurhaltung.cpp Wed Apr 25 11:16:16 2018 +0000
+++ b/Classes/Spurhaltung.cpp Sun Apr 29 11:29:00 2018 +0000
@@ -17,8 +17,9 @@
int Spurhaltung::speedl()
{
- if(abs(Sensor2.read()-Sensor3.read())<20) {
- int sl = Sensor3.read() * 1.875;
+ if(abs(Sensor3.read()-Sensor2.read())<100) {
+
+ int sl = Sensor2.read() * 1.825;
return sl;
} else {
int sl = 150;
@@ -30,8 +31,8 @@
int Spurhaltung::speedr()
{
- if(abs(Sensor3.read()-Sensor2.read())<20) {
- int sr = Sensor2.read() * 1.875;
+ if(abs(Sensor2.read()-Sensor3.read())<100) {
+ int sr = Sensor3.read() * 1.825;
return sr;
} else {
int sr = 150;
