1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00
Commit graph

27 commits

Author SHA1 Message Date
Steve Evans
2163e44df3
Don't waste time displaying an empty OSD string (#14152) 2025-01-14 13:06:22 +00:00
Steve Evans
3e51d15559
Add HD OSD support (#11964) 2022-11-15 12:58:14 +11:00
Dominic Clifton
6c53ca2552 MAX7456 - Cleanups.
This commit is squashed from the following commits:

MAX7456 - Calculate buffer offset only once per string.

MAX7456 - Avoid duplicate addition by using second loop variable.

MAX7456 - Rename 'buff' to 'input' for clarity.
> There's two 'buffers', now the other variable names make more sense.

MAX7456 - Use consistent variable names.
> Use `text` instead of `s` and `input`.
2022-06-23 15:33:42 +02:00
Dominic Clifton
e2c0388a6a OSD - Add support for async screen clearing to display API.
No screen clearing is actually done asynchronously yet.
2022-01-22 18:59:11 +01:00
Steve Evans
ab1baccc66 Track state execution time for OSD, baro, rx and GPS tasks and inform scheduler of next state execution time 2021-12-17 15:40:01 +00:00
Bruce Luckcuck
07598d824c 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.
2021-01-16 13:57:04 -05:00
Bruce Luckcuck
e7b9828c3b Add option to display OSD menus over a solid gray background
Improves menu readability by changing the background from a transparent display of the camera image to a static opaque gray background.

The behavior is controlled with the `osd_menu_background` parameter which defaults to `TRANSPARENT` to preserve the previous behavior. Other opaque options are available:
```
osd_menu_background = TRANSPARENT
Allowed values: TRANSPARENT, BLACK, GRAY, LIGHT_GRAY
```

The background setting is available in the CMS OSD menu and the user can cycle through the various options with the display updating in real-time.

Currently only the onboard MAX7456-based OSD is supported, but the implementation adds `displayPort` support so it can easily be extended to other OSD devices if those manufacturers want to add support. Also can be extended to other background types (like colors, varying transparency, etc.) for future device support.

Makes use of the built-in MAX7456 feature to display all transparent pixels as "gray". The MAX7456 display area seems to be a few scan lines smaller than the actual camera video image so it's normal for some of the camera image to "leak" at the top/bottom of the display. The OSD display area can be adjusted up/down using the `vcd_v_offset` setting if desired.
2021-01-10 18:19:59 -05:00
mikeller
cfc89c98a8 Fixed the MAX7456 loop time problems introduced by #9948. 2020-07-05 22:00:13 +12:00
Alberto García Hierro
37e66b3dda Add support for FrSky OSD
- Add displayWriteFontCharacter() for font writing, removing all max7456
specific code.
- Add displayIsReady() for asynchronous display initialization
- Add displayBeginTransaction()/displayCommitTransaction() for display
transactions, which allow performing complex drawing operations without
flickering
- Add displayGetCanvas(), which retrieves the canvas associated with a
display (if it has it)
- Add canvas implementation for pixel based access for a display
- Add FrSkyOSD driver and displayPort driver
- Enable FrSkyOSD driver for targets with flash > 256
- Rename max7456_symbols.h to osd_symbols.h
2019-11-30 22:06:36 +00:00
jflyper
2e84b0c442 Add support for character attribute rich displayport 2019-11-25 10:43:29 +09:00
Bruce Luckcuck
5f5ee33718 Add OSD background support for the static portions of display elements
Significantly reduces the time the OSD task spends drawing elements that are completely or mostly static. The larger the element the more time savings are realized. Currently implemented support for:
- Crosshairs
- Artificial Horizon Sidebars
- Craft name
- Display name
- Stick overlay

Since the static portions are only rendered once, the static elements add no processing time to the OSD task. As an example, enabling the above elements prior to these changes results in a total rendering time of 47us. After the enhancements they take only 6us (basically the rendering phase minimum overhead). So effectively 41us are removed from the OSD task.

Opens the possibility to add large mostly static elements with no additional overhead. An example would be a camera framing element that might draw a "box" around most of the screen. Previously this would add significant processing overhead to the OSD task, but now it will have no impact.
2019-10-28 19:34:29 -04:00
Scavanger
dd30009925 "Fullscreen" mode for displayports. 2019-01-20 20:46:23 +01:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
Michael Keller
dd25358a63
Merge pull request #3028 from cleanflight/improve-osd-slave-comms (#5405)
Improve OSD slave timeout/disconnect/reconnect handling.
2018-03-15 02:30:46 +13:00
Steffen Windoffer
03aa31acdd remove not needed whitespaces 2017-08-24 11:33:39 +02:00
Martin Budden
1c7f574a55 Displayport tidy 2017-06-28 21:21:29 +01:00
Martin Budden
7c8d1967d0 Improved OSD & displayPort initialisation. Allowed nested screen grabbing 2016-11-19 06:47:53 +00:00
Martin Budden
c97e71e995 Made OSD device independent, now uses displayPort 2016-11-19 06:47:53 +00:00
jflyper
aed2e48266 Tidy 2016-11-07 20:17:52 +09:00
Martin Budden
d8a83518db CMS file renaming. displayPort renaming 2016-11-06 20:24:33 +00:00
Martin Budden
a7a428a5bb Code tidy and addition of GPL headers 2016-11-06 10:29:11 +00:00
jflyper
4ae6f8c1c4 displayPort device registration changed 2016-11-06 02:37:45 +09:00
Martin Budden
ca1de7a4d9 Split OLED displayport out of dashboard 2016-11-04 10:25:44 +00:00
jflyper
51d4b34540 Some names made more intuitive 2016-11-04 17:22:58 +09:00
jflyper
d1aa8a603c begin-end to open-close 2016-11-04 09:48:44 +09:00
Martin Budden
1f5e593120 Abstracted displayPort from CMS 2016-11-03 21:24:31 +00:00