mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Add up/down page indicator to CMS menu display
Often the user doesn't realize that there are more menu items then displayed and the only way to tell was to try and move the selection to the bottom to see if another page appears. This PR adds page up/down indicators if there are more menu items than those visible on the current display. Uses the OSD arrow symbols when possible (for OSD supporting devices), otherwise the `^` (carat) and `V` are used for text-only represenatations. To determine if the device was capable of displaying symbols the `displayPort` structure has a new `deviceType` set when it is initialized. There have been other times when knowing the type of device would have been useful so that's now supported. Then this is abstracted by a new `displaySupportsOsdSymbols()` function. Devices that support OSD are assumed to support the OSD symbols as the OSD element drawing code always uses them. For devices that don't support OSD function we have to presume the sybols aren't available.
This commit is contained in:
parent
35de1c8229
commit
07598d824c
11 changed files with 60 additions and 14 deletions
|
@ -172,7 +172,7 @@ static const displayPortVTable_t mspDisplayPortVTable = {
|
|||
|
||||
displayPort_t *displayPortMspInit(void)
|
||||
{
|
||||
displayInit(&mspDisplayPort, &mspDisplayPortVTable);
|
||||
displayInit(&mspDisplayPort, &mspDisplayPortVTable, DISPLAYPORT_DEVICE_TYPE_MSP);
|
||||
|
||||
if (displayPortProfileMsp()->useDeviceBlink) {
|
||||
mspDisplayPort.useDeviceBlink = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue