1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Avoided compass task wrapper function

This commit is contained in:
Martin Budden 2017-11-10 14:08:12 +00:00
parent b71fe232c3
commit 78cc4f65a1
3 changed files with 11 additions and 19 deletions

View file

@ -157,15 +157,6 @@ static void taskUpdateRxMain(timeUs_t currentTimeUs)
}
#endif
#ifdef USE_MAG
static void taskUpdateCompass(timeUs_t currentTimeUs)
{
if (sensors(SENSOR_MAG)) {
compassUpdate(currentTimeUs, &compassConfigMutable()->magZero);
}
}
#endif
#ifdef USE_BARO
static void taskUpdateBaro(timeUs_t currentTimeUs)
{
@ -463,7 +454,7 @@ cfTask_t cfTasks[TASK_COUNT] = {
#ifdef USE_MAG
[TASK_COMPASS] = {
.taskName = "COMPASS",
.taskFunc = taskUpdateCompass,
.taskFunc = compassUpdate,
.desiredPeriod = TASK_PERIOD_HZ(10), // Compass is updated at 10 Hz
.staticPriority = TASK_PRIORITY_LOW,
},