mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
c85a172370
76 changed files with 22260 additions and 6512 deletions
|
@ -420,7 +420,6 @@ typedef enum {
|
|||
#if defined(BARO) || defined(SONAR)
|
||||
CALCULATE_ALTITUDE_TASK,
|
||||
#endif
|
||||
UPDATE_GPS_TASK,
|
||||
UPDATE_DISPLAY_TASK
|
||||
} periodicTasks;
|
||||
|
||||
|
@ -464,17 +463,6 @@ void executePeriodicTasks(void)
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef GPS
|
||||
case UPDATE_GPS_TASK:
|
||||
// if GPS feature is enabled, gpsThread() will be called at some intervals to check for stuck
|
||||
// hardware, wrong baud rates, init GPS if needed, etc. Don't use SENSOR_GPS here as gpsThread() can and will
|
||||
// change this based on available hardware
|
||||
if (feature(FEATURE_GPS)) {
|
||||
gpsThread();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef SONAR
|
||||
case UPDATE_SONAR_TASK:
|
||||
if (sensors(SENSOR_SONAR)) {
|
||||
|
@ -642,6 +630,15 @@ void loop(void)
|
|||
} else {
|
||||
// not processing rx this iteration
|
||||
executePeriodicTasks();
|
||||
|
||||
// if GPS feature is enabled, gpsThread() will be called at some intervals to check for stuck
|
||||
// hardware, wrong baud rates, init GPS if needed, etc. Don't use SENSOR_GPS here as gpsThread() can and will
|
||||
// change this based on available hardware
|
||||
#ifdef GPS
|
||||
if (feature(FEATURE_GPS)) {
|
||||
gpsThread();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
currentTime = micros();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue