1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 15:25:36 +03:00

Working version after rebase (onto master)

This commit is contained in:
jflyper 2016-11-01 12:23:12 +09:00
parent ab7bb1342a
commit 9264a9a302
3 changed files with 28 additions and 1 deletions

View file

@ -269,6 +269,19 @@ static void taskUpdateOsd(uint32_t currentTime)
}
#endif
#ifdef VTX_CONTROL
// Everything that listens to VTX devices
void taskVtxControl(uint32_t currentTime)
{
if (ARMING_FLAG(ARMED))
return;
#ifdef VTX_SMARTAUDIO
smartAudioProcess(currentTime);
#endif
}
#endif
void fcTasksInit(void)
{
schedulerInit();
@ -329,6 +342,9 @@ void fcTasksInit(void)
#ifdef USE_BST
setTaskEnabled(TASK_BST_MASTER_PROCESS, true);
#endif
#ifdef VTX_CONTROL
setTaskEnabled(TASK_VTXCTRL, true);
#endif
}
cfTask_t cfTasks[TASK_COUNT] = {
@ -488,4 +504,13 @@ cfTask_t cfTasks[TASK_COUNT] = {
.staticPriority = TASK_PRIORITY_IDLE,
},
#endif
#ifdef VTX_CONTROL
[TASK_VTXCTRL] = {
.taskName = "VTXCTRL",
.taskFunc = taskVtxControl,
.desiredPeriod = 1000000 / 5, // 5Hz @200msec
.staticPriority = TASK_PRIORITY_IDLE,
},
#endif
};