commit
01c63d0dd2
4
src/mw.c
4
src/mw.c
|
@ -770,8 +770,6 @@ void loop(void)
|
||||||
}
|
}
|
||||||
} else { // not in rc loop
|
} else { // not in rc loop
|
||||||
static int taskOrder = 0; // never call all function in the same loop, to avoid high delay spikes
|
static int taskOrder = 0; // never call all function in the same loop, to avoid high delay spikes
|
||||||
if (taskOrder > 4)
|
|
||||||
taskOrder -= 5;
|
|
||||||
switch (taskOrder) {
|
switch (taskOrder) {
|
||||||
case 0:
|
case 0:
|
||||||
taskOrder++;
|
taskOrder++;
|
||||||
|
@ -801,7 +799,7 @@ void loop(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
taskOrder++;
|
taskOrder = 0;
|
||||||
#ifdef SONAR
|
#ifdef SONAR
|
||||||
if (sensors(SENSOR_SONAR)) {
|
if (sensors(SENSOR_SONAR)) {
|
||||||
Sonar_update();
|
Sonar_update();
|
||||||
|
|
Loading…
Reference in New Issue