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

CMS Telemetry over CRSF w/ Lua Script (X9D, so far)

This commit is contained in:
Curtis Bangert 2018-04-19 12:50:32 -04:00
parent b2c247d34a
commit 9d4d3ad45c
17 changed files with 393 additions and 5 deletions

View file

@ -108,6 +108,19 @@ static displayPort_t *cmsDisplayPortSelectNext(void)
return cmsDisplayPorts[cmsCurrentDevice];
}
bool cmsDisplayPortSelect(displayPort_t *instance)
{
if (cmsDeviceCount == 0) {
return false;
}
for (int i = 0; i < cmsDeviceCount; i++) {
if (cmsDisplayPortSelectNext() == instance) {
return true;
}
}
return false;
}
#define CMS_UPDATE_INTERVAL_US 50000 // Interval of key scans (microsec)
#define CMS_POLL_INTERVAL_US 100000 // Interval of polling dynamic values (microsec)
@ -638,7 +651,7 @@ STATIC_UNIT_TESTED long cmsMenuBack(displayPort_t *pDisplay)
return 0;
}
STATIC_UNIT_TESTED void cmsMenuOpen(void)
void cmsMenuOpen(void)
{
if (!cmsInMenu) {
// New open