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:
parent
ab7bb1342a
commit
9264a9a302
3 changed files with 28 additions and 1 deletions
|
@ -269,6 +269,19 @@ static void taskUpdateOsd(uint32_t currentTime)
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
void fcTasksInit(void)
|
||||||
{
|
{
|
||||||
schedulerInit();
|
schedulerInit();
|
||||||
|
@ -329,6 +342,9 @@ void fcTasksInit(void)
|
||||||
#ifdef USE_BST
|
#ifdef USE_BST
|
||||||
setTaskEnabled(TASK_BST_MASTER_PROCESS, true);
|
setTaskEnabled(TASK_BST_MASTER_PROCESS, true);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef VTX_CONTROL
|
||||||
|
setTaskEnabled(TASK_VTXCTRL, true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cfTask_t cfTasks[TASK_COUNT] = {
|
cfTask_t cfTasks[TASK_COUNT] = {
|
||||||
|
@ -488,4 +504,13 @@ cfTask_t cfTasks[TASK_COUNT] = {
|
||||||
.staticPriority = TASK_PRIORITY_IDLE,
|
.staticPriority = TASK_PRIORITY_IDLE,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VTX_CONTROL
|
||||||
|
[TASK_VTXCTRL] = {
|
||||||
|
.taskName = "VTXCTRL",
|
||||||
|
.taskFunc = taskVtxControl,
|
||||||
|
.desiredPeriod = 1000000 / 5, // 5Hz @200msec
|
||||||
|
.staticPriority = TASK_PRIORITY_IDLE,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,9 +16,11 @@
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
|
|
||||||
#include "flight/pid.h"
|
#include "flight/pid.h"
|
||||||
|
#if 0
|
||||||
#include "config/config.h"
|
#include "config/config.h"
|
||||||
#include "config/config_eeprom.h"
|
#include "config/config_eeprom.h"
|
||||||
#include "config/config_profile.h"
|
#include "config/config_profile.h"
|
||||||
|
#endif
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
|
|
@ -86,7 +86,7 @@ typedef enum {
|
||||||
TASK_BST_MASTER_PROCESS,
|
TASK_BST_MASTER_PROCESS,
|
||||||
#endif
|
#endif
|
||||||
#ifdef VTX_CONTROL
|
#ifdef VTX_CONTROL
|
||||||
TASK_VTX_CONTROL,
|
TASK_VTXCTRL,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Count of real tasks */
|
/* Count of real tasks */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue