1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +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
};

View file

@ -16,9 +16,11 @@
#include "fc/runtime_config.h"
#include "flight/pid.h"
#if 0
#include "config/config.h"
#include "config/config_eeprom.h"
#include "config/config_profile.h"
#endif
#include "config/config_master.h"
#include "build/build_config.h"

View file

@ -86,7 +86,7 @@ typedef enum {
TASK_BST_MASTER_PROCESS,
#endif
#ifdef VTX_CONTROL
TASK_VTX_CONTROL,
TASK_VTXCTRL,
#endif
/* Count of real tasks */