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

Configuration Menu System support for external OSD

A quick hack to support config menu on external OSD, consisiting of:

- CMS-OSD partial separation (CMS and OSD reside in a same file: osd.c)
- MSP message injection (take it as server-push in client-server model)
This commit is contained in:
jflyper 2016-10-19 02:39:52 +09:00
parent 9b83af1ccd
commit 01eab00fd7
12 changed files with 1025 additions and 662 deletions

View file

@ -47,6 +47,7 @@
#include "io/serial.h"
#include "io/serial_cli.h"
#include "io/transponder_ir.h"
#include "io/cms.h"
#include "msp/msp_serial.h"
@ -328,6 +329,10 @@ void fcTasksInit(void)
#ifdef USE_BST
setTaskEnabled(TASK_BST_MASTER_PROCESS, true);
#endif
#ifdef CMS
// XXX Should check FEATURE
setTaskEnabled(TASK_CMS, true);
#endif
}
cfTask_t cfTasks[TASK_COUNT] = {
@ -487,4 +492,13 @@ cfTask_t cfTasks[TASK_COUNT] = {
.staticPriority = TASK_PRIORITY_IDLE,
},
#endif
#ifdef CMS
[TASK_CMS] = {
.taskName = "CMS",
.taskFunc = cmsHandler,
.desiredPeriod = 1000000 / 60, // 60 Hz
.staticPriority = TASK_PRIORITY_LOW,
},
#endif
};