mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
More displayPort_t, CANVAS as new feature, multi-display cycling
- Further touch-ups with displayPort_t handling. - CANVAS is a FEATURE now. - Device specific xxxCmsInit() are registered by device’s init, and called by CMS upon entry to menu. - Multiple display devices can be cycled by entering menu invocation command while in menu. - The menu invocation command is (was) changed to THR-Mid + YAW-Left + Pitch-Full to avoid collision with MWOSD menu invocation command. - More separation attempt.
This commit is contained in:
parent
7960b1665d
commit
720a841008
17 changed files with 267 additions and 182 deletions
|
@ -64,13 +64,6 @@
|
|||
|
||||
#include "build/debug.h"
|
||||
|
||||
#ifdef USE_DPRINTF
|
||||
extern serialPort_t *debugSerialPort;
|
||||
#define dprintf(x) if (debugSerialPort) printf x
|
||||
#else
|
||||
#define dprintf(x)
|
||||
#endif
|
||||
|
||||
// Things in both OSD and CMS
|
||||
|
||||
#define IS_HI(X) (rcData[X] > 1750)
|
||||
|
@ -398,7 +391,7 @@ void osdInit(void)
|
|||
}
|
||||
|
||||
#ifdef CMS
|
||||
cmsInit();
|
||||
cmsDeviceRegister(osdCmsInit);
|
||||
#endif
|
||||
|
||||
sprintf(string_buffer, "BF VERSION: %s", FC_VERSION_STRING);
|
||||
|
@ -709,16 +702,12 @@ screenFnVTable_t osdVTable = {
|
|||
max7456RefreshAll,
|
||||
};
|
||||
|
||||
displayPort_t osdDisplayPort = {
|
||||
.buftime = 1, // Very fast
|
||||
.bufsize = 50000, // Very large
|
||||
.VTable = &osdVTable,
|
||||
};
|
||||
|
||||
displayPort_t *osdCmsInit(void)
|
||||
void osdCmsInit(displayPort_t *pPort)
|
||||
{
|
||||
osdDisplayPort.rows = max7456GetRowsCount();
|
||||
osdDisplayPort.cols = 30;
|
||||
return &osdDisplayPort;
|
||||
pPort->rows = max7456GetRowsCount();
|
||||
pPort->cols = 30;
|
||||
pPort->buftime = 1; // Very fast
|
||||
pPort->bufsize = 50000; // Very large
|
||||
pPort->VTable = &osdVTable;
|
||||
}
|
||||
#endif // OSD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue