Code-Work :)
This commit is contained in:
parent
c6ec20e5e7
commit
7393d1d12c
8 changed files with 1247 additions and 1179 deletions
|
@ -34,7 +34,10 @@ void Ballsensor::Aktualisieren() {
|
|||
// Suche den kleinsten Wert
|
||||
for(int i=0;i<NUM_BALLSENSOR;i++) {
|
||||
// Wenn der Sensorwert kleiner ist ist der Ball näher dran
|
||||
if(sensor[i] < current) result = i; // Ergebnis ist erstmal index
|
||||
if(sensor[i] < current) {
|
||||
result = i; // Ergebnis ist erstmal index
|
||||
current = sensor[i]; // Setze neuen Vergleichswert
|
||||
}
|
||||
}
|
||||
|
||||
// Setze den Winkel zum index result
|
||||
|
|
Reference in a new issue