1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00
Commit graph

35 commits

Author SHA1 Message Date
Michael Keller
099e0a6064 Added OSD status to CLI 'status' output. 2020-01-15 23:32:38 +13:00
Alberto García Hierro
65f84f2c86 [MSP] Correctly report the configured and active OSD type
- Tell the OSD driver the type of displayPort, so it can be retrieved
later.
- Use OSD driver code instead of device specific code to handle
MSP_OSD_CONFIG response while minimizing driver specific code.
- Add flag for signaling the use of FrSky OSD (bit 3).
- Rename OSD_FLAGS_MAX7456_DETECTED to OSD_FLAGS_OSD_DEVICE_DETECTED.
Since we only support one OSD device type at a time, we can use the
same bit to signal wether the hardware has been detected.
2020-01-04 12:35:09 +00:00
Bruce Luckcuck
afeb88850f Move OSD elements into their own parameter group
Separates the OSD elements position/visible/profile flags from the `osdConfig` PG and moves them to a new `osdElementConfig` PG. Allows new elements to be added without having to constantly update the PG version for `osdConfig`.
2019-12-09 19:13:08 -05:00
mikeller
be48054b5f Fixed missing parameter group version increment for 'osdConfig' after #9261. 2019-12-08 14:51:59 +13:00
Bruce Luckcuck
5c3b8c6eb6 Add camera frame OSD element
Adds an adjustable outline element designed to represent the field of view of the pilot's HD camera for visual framing. The width, height and position of the frame are adjustable.
2019-12-04 11:03:41 -05: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
Bruce Luckcuck
6b1f8485ac Add configurable duration to show the OSD logo on arming
Adds `osd_logo_on_arming_duration` which is configured in 0.1s intervals ranging from 5 to 50 (0.5s to 5.0s). The default is 5 (0.5s) to be consistent with the previous "ARMED" splash screen.
2019-11-29 15:55:49 -05:00
Bruce Luckcuck
05c8538752 Add option to display the OSD logo on arming
Adds `osd_logo_on_arming` setting with values `OFF, ON, FIRST_ARMING` (defaults to `OFF`). Optionally displays the OSD splash logo durin the "ARMING" message.
2019-11-28 13:38:33 -05:00
mikeller
21b9fba3bf Some fixes for what looks like merge problems introduced by #9012. 2019-11-25 19:01:27 +13: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
Bruce Luckcuck
565f1f4db5 Add ACC_CALIB arming disabled reason if ACC is required but not calibrated
Checks various features, modes, and OSD elements to determine if ACC is needed. Generates an arming disabled warning if ACC calibration has never been completed.
2019-10-21 11:13:55 -04:00
Bruce Luckcuck
a021cc7c14 Add OSD distance from home alarm
Adds `osd_distance_alarm` (defaulting to 0 for OFF) which behaves similarly to `osd_alt_alarm`. Causes the OSD distance to home element to blink if the alarm setting is exceeded.

Also added to the CMS menu for consistency with the altitude alarm.
2019-10-21 20:17:12 +13:00
jflyper
8494d6e634 Add OSD displayPort device configurability 2019-10-18 14:56:19 +09:00
jflyper
d4b4e37f6f Add RC channel values to OSD 2019-09-12 22:53:21 +09:00
Tony Cabello
8cd23873a6 Feature: show HDOP next to sats indicator 2019-08-26 22:28:33 +02:00
Bruce Luckcuck
1b8fd99126 Disconnect OSD stats display from storage bit position order
Allows reordering OSD post-flight statistics without affecting the storage bit position and requiring Configurator changes. Previously the display order was one and the same with the enabled flag bit position. Additionally this ordering was also used by the configurator. So if the ordering was changed then the user settings would become corrupted (different stats would be enabled/disabled). Also the Configurator had an internal representation that had to match the definition enumeration otherwise the flags returned when saving would also set the wrong bits.

Now the definition remains constant and unchanging. The bit positions for the enable flag will not be changed. A separate array defines the presentaion order of the permanent stats ID's.

Added the display order to MSP to allow the configurator to also present the stats in the same order displayed in the firmware.
2019-06-21 08:37:18 -04:00
pkruger
b8a9e46a8d
Merge branch 'master' into 8107-osd-profile-names 2019-05-22 21:58:36 +10:00
pkruger
9ae53d94d0
Merge branch 'master' into 8107-osd-profile-names 2019-05-21 21:22:50 +10:00
laz2wiringpi
c1510c9f27 USE_RX_RSSI_DBM Split from pr 8042
rssi dbm osd negitive values
rename max to min
2019-05-20 22:19:04 -04:00
laz2wiringpi
e9a406f447 Link Quality without Aux
fix indent , move unused
remove premature optimisation
Use prior code for osd element calc
unit test add crsf for scaleCrsfLq
unittest typo
rx 0-100
elements simplify osdElementLinkQuality refactor
share  one 16 bit var
2019-05-20 18:10:37 -04:00
Pieter Kruger
28182706a4 Add OSD profile names feature 2019-05-19 10:50:22 +10:00
Bruce Luckcuck
d62a4f4b18 Add tenths of a second OSD timer precision option
Currently the timers support full second and hundredth of a second display precision. This adds a tenth of a second option.
2019-05-17 14:25:30 -04:00
Pieter Kruger
de5a54a19a Add PID and Rate Profile names 2019-05-06 22:02:33 +10:00
krzysztofmatula
14bb0fca72
Merge branch 'master' into km-stats-postflight 2019-04-21 22:44:44 +02:00
Michael Keller
655b82d379
Merge pull request #8016 from krzysztofmatula/km-timer-safety-checks
OSD timers safety checks
2019-04-19 13:43:38 +12:00
Michael Keller
edcacb9f0d
Merge pull request #7994 from krzysztofmatula/km-on-arm-timer
OSD: combined ON/ARM timer
2019-04-19 13:38:56 +12:00
ianrmurphy
0ab0fb75ff Corrected whitespace. 2019-04-15 23:32:20 +01:00
Krzysztof Matula
b8b5b133dc OSD timers safety - code review changes 2019-04-15 23:25:58 +02:00
ianrmurphy
8dc1befab1 Corrected parameter ordering, no MSP. 2019-04-15 12:33:47 +01:00
ianrmurphy
11dd4e7598 Added warnings for RSSI and Link Quality, added Link Quality alarm. 2019-04-15 00:24:20 +01:00
Krzysztof Matula
cd0e90fdde OSD: allow to present odometer on post flight screen 2019-04-14 23:34:09 +02:00
Krzysztof Matula
24bf8050c1 OSD: combined ON/ARM timer 2019-04-12 22:41:22 +02:00
jack
45a35eb42d adding rpm and rpm frequency for each motor to osd. It uses either Bidirectional Dshot or ESC telemetry to work out the rpm. Bidirectional Dshot takes precedency over ESC telemetry. 2019-03-07 20:51:43 +11:00
Bruce Luckcuck
30672a37c5 Refactor OSD element display code
Remove the giant `select` block that contained all the code to generate the elements and transition them to individual functions called only when the element is active. Simplifies the code and results in a performance improvement as it's not necessary to fall through the large `select` statement for every element that will be drawn. The individual functions and the element to function mapping are moved to a new `osd_elements.c` file.

Moved the OSD related code files to a new `osd/` directory.

Also pre-analyze the active elements and only process those that are active. This also saves processing as it's not necessary to loop through all 50 or so elements when only a couple are active.

Various other cleanup and removal of stale or unnecessary code.

In the default configuration the element drawing phase of the OSD task is reduced from ~51us to ~35us - resulting in about a 30% decrease in processing time.
2019-02-21 14:03:25 -05:00
Renamed from src/main/io/osd.h (Browse further)