Gruppe 3
/
PES1
für holdor
Fork of PES by
Revision 26:c2f7c6cdeece, committed 2017-05-01
- Comitter:
- Shukle
- Date:
- Mon May 01 15:37:23 2017 +0000
- Parent:
- 25:a50ca6f2eca4
- Commit message:
- final vom 1.5.2017
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
readCamera.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a50ca6f2eca4 -r c2f7c6cdeece main.cpp --- a/main.cpp Mon May 01 14:02:35 2017 +0000 +++ b/main.cpp Mon May 01 15:37:23 2017 +0000 @@ -81,9 +81,9 @@ case 2: printf("2"); - if(time1 < 20) { // Im Kreis drehen für 1s - pwmL = 0.4f; - pwmR = 0.4f; + if(time1 < 40) { // Im Kreis drehen für 1s + pwmL = 0.45f; + pwmR = 0.45f; time1 ++; state = 1; tempState = 2; @@ -116,25 +116,25 @@ case 4: // Roboter erkennt gründer Klotz, Klotz wird angefahren printf("4"); - double maxWert = 0.1; // Maximale Werte für die pmL und pmR + double maxWert = 0.05; // Maximale Werte für die pmL und pmR roboter1.bandeAusweichen(); if(camValue >= 100 && camValue <200 ) { // links fahren, wenn wir Werte von 100 bis 199 haben camValue = camValue -99.0; double speedValue = camValue * (maxWert /100.0); - pwmL = 0.45f - speedValue; - pwmR = 0.45f - speedValue; + pwmL = 0.465f - speedValue; + pwmR = 0.475f - speedValue; } if(camValue >=200 && camValue < 300) { // rechts fahren, wenn wir Werte von 200 bis 299 haben camValue = camValue -199.0; double speedValue = camValue * (maxWert /100.0); - pwmL = 0.5f + speedValue; - pwmR = 0.5f + speedValue; + pwmL = 0.555f + speedValue; + pwmR = 0.535f + speedValue; } if(camValue >= 300 && camValue <400) { // gerade fahren, wenn wir Werte von 300 bis 399 haben camValue = camValue-299.0; // CamValue nimmt die Werte von 1 bis 100 an double speedValue = camValue * (maxWert /100.0); // Berechnung des speedValue's - pwmL = 0.5f + speedValue; - pwmR = 0.5f - speedValue; + pwmL = 0.56f + speedValue; + pwmR = 0.45f - speedValue; } state = 1;
diff -r a50ca6f2eca4 -r c2f7c6cdeece readCamera.cpp --- a/readCamera.cpp Mon May 01 14:02:35 2017 +0000 +++ b/readCamera.cpp Mon May 01 15:37:23 2017 +0000 @@ -56,7 +56,7 @@ printf("\n\rgerade\n\r"); } } else { // fährt solange bis Kegelrand - if (xAxis > 185 || xAxis < 135) { + if (xAxis > 200 || xAxis < 120) { range = 1; } distance = (((double) yAxis - (double) yLimit)/(double) yLimit)*-100.0;