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 PES by
Diff: main.cpp
- Revision:
- 13:7eba9911e196
- Parent:
- 12:b9faf8637183
- Child:
- 14:7e330f65f26e
diff -r b9faf8637183 -r 7eba9911e196 main.cpp
--- a/main.cpp Wed Apr 19 15:38:56 2017 +0000
+++ b/main.cpp Wed Apr 19 15:57:28 2017 +0000
@@ -44,7 +44,7 @@
int state = 0; // Diese Variable gibt an in welchem State man sich befindet
-
+ int tempState = 2;
while(1) {
@@ -68,7 +68,7 @@
state = 5;
}
if(readCamera() == 0){
- state = 2;
+ state = tempState;
}
@@ -79,6 +79,7 @@
pwmR = 0.4f;
time1 ++;
state = 1;
+ tempState = 2;
} else {
time1 = 0;
pwmL = 0.5f;
@@ -96,6 +97,7 @@
pwmR = 0.4f;
time2 ++;
state = 1;
+ tempState = 3;
} else {
time2 = 0;
pwmL = 0.5f;
@@ -119,12 +121,14 @@
pwmL = 0.55f;
pwmR = 0.45f;
}
+ state = 1;
break;
case 5: // Aufnehmen des Klotzes
pwmL = 0.5f;
pwmR = 0.5f;
+ state = 1;
break;
