1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

Merge pull request #7 from martinbudden/jf_osd7

Added CMS test code
This commit is contained in:
jflyper 2016-11-08 17:59:58 +09:00 committed by GitHub
commit 6bcec1bcd7
5 changed files with 260 additions and 7 deletions

View file

@ -32,8 +32,9 @@
#ifdef CMS
#include "build/version.h"
#include "build/build_config.h"
#include "build/debug.h"
#include "build/version.h"
#include "cms/cms.h"
#include "cms/cms_menu_builtin.h"
@ -124,7 +125,7 @@ static displayPort_t *cmsDisplayPortSelectNext(void)
static bool cmsInMenu = false;
static CMS_Menu *currentMenu; // Points to top entry of the current page
STATIC_UNIT_TESTED CMS_Menu *currentMenu; // Points to top entry of the current page
// XXX Does menu backing support backing into second page???
@ -489,7 +490,7 @@ long cmsMenuChange(displayPort_t *pDisplay, void *ptr)
return 0;
}
static long cmsMenuBack(displayPort_t *pDisplay)
STATIC_UNIT_TESTED long cmsMenuBack(displayPort_t *pDisplay)
{
// Let onExit function decide whether to allow exit or not.
@ -520,7 +521,7 @@ static long cmsMenuBack(displayPort_t *pDisplay)
return 0;
}
static void cmsMenuOpen(void)
STATIC_UNIT_TESTED void cmsMenuOpen(void)
{
if (!cmsInMenu) {
// New open
@ -595,7 +596,7 @@ long cmsMenuExit(displayPort_t *pDisplay, void *ptr)
return 0;
}
static uint16_t cmsHandleKey(displayPort_t *pDisplay, uint8_t key)
STATIC_UNIT_TESTED uint16_t cmsHandleKey(displayPort_t *pDisplay, uint8_t key)
{
uint16_t res = BUTTON_TIME;
OSD_Entry *p;
@ -853,6 +854,8 @@ void cmsHandler(uint32_t currentTime)
// Can it be done with the current main()?
void cmsInit(void)
{
cmsDeviceCount = 0;
cmsCurrentDevice = -1;
}
#endif // CMS