1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00

taskorder

This commit is contained in:
treymarc 2014-04-12 02:55:21 +00:00
parent aa253a387d
commit 7d2e2c22aa

View file

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