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

96 commits

Author SHA1 Message Date
Michael Keller
9425831756
Refactored 'WAS_EVER_ARMED' arming flag to be only enabled on f… (#9248)
Refactored 'WAS_EVER_ARMED' arming flag to be only enabled on first disarm.
2019-12-01 15:14:02 +13: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
mikeller
93c708f57d Refactored 'WAS_EVER_ARMED' arming flag to be only enabled on first disarm. 2019-11-30 15:01:55 +13: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
jflyper
2e84b0c442 Add support for character attribute rich displayport 2019-11-25 10:43:29 +09:00
mikeller
53955a4a6b Show blackbox log number in OSD only when available. 2019-11-03 02:29:38 +13: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
Michael Keller
c33cc100ec
Merge pull request #8759 from TonyBlit/3d_speed
Feature: show 3d speed on the OSD
2019-09-01 01:19:03 +12:00
Tony Cabello
0ddcfc097c Feature: show 3d speed on OSD 2019-08-30 08:21:19 +02:00
Tony Cabello
8cd23873a6 Feature: show HDOP next to sats indicator 2019-08-26 22:28:33 +02:00
Bruce Luckcuck
b962416333 Remove settings parameter; update to use the new kilometer and miles symbols 2019-06-27 10:14:14 -04:00
Bruce Luckcuck
2e9e99ff42 Simplified leading symbol logic and change setting to default to ON 2019-06-25 18:38:27 -04:00
Bruce Luckcuck
865515113e Add dynamic distance formatting for OSD elements
Optionally format distance as meters/kilometers or feet/miles based on overal distance. For metric, distance will be displayed as:

0-999m: display meters
1000-9999m: display as kilometers with 2 decimals (ie. 1.23K)
10000m and above: display as kilometers with 1 decimal (ie. 10.5K)

Similar for imperial units except that will display feet up to 1 mile (5280ft), miles with 2 decimals from 1-9.99 miles, and with 1 decimal over 10 miles.

Configured with `osd_dynamic_distance_units = OFF | ON`. If off (the default) then the behavior is unchanged and the distance will be only displayed in meters or feet depending on the units selection.

There are currently no OSD font symbols for kilometers or miles so "K" and "M" are used at this time.
2019-06-24 19:57:14 -04: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
laz2wiringpi
15c25520e3 add missing code
cleanup space(s)
comment 
move define define in post  add to pre
2019-05-21 16:40:21 -04: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
jflyper
f5084a59bd Partitions are now accessed by types rather than indices 2019-05-19 20:32:52 +09:00
Pieter Kruger
28182706a4 Add OSD profile names feature 2019-05-19 10:50:22 +10:00
Dominic Clifton
92999681e3 Add flash partitioning system 2019-05-18 21:39:08 +09:00
mikeller
5141bbfa94 Moved 'rpm_filter' into 'flight'. 2019-05-06 00:10:31 +12:00
krzysztofmatula
14bb0fca72
Merge branch 'master' into km-stats-postflight 2019-04-21 22:44:44 +02:00
Michael Keller
eba5856654
Merge pull request #8035 from krzysztofmatula/km-sym-amp
OSD: use nice AMP symbol in post flight stats instead of ordinary "A"
2019-04-19 14:04:42 +12:00
Michael Keller
380889912f
Merge pull request #8025 from etracer65/osd_stats_maximize_lines
Maximize OSD stats display lines based on video mode
2019-04-19 13:50:04 +12: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
Krzysztof Matula
00d9b0bb50 OSD: use nice AMP symbol in post flight stats instead of ordinary "A" 2019-04-17 22:38:56 +02:00
Bruce Luckcuck
00c3a5d1b4 Maximize OSD stats display lines based on video mode
Will dynamically determine the number of active OSD stats lines that are being displayed (accounting for user selections and #define logic) and maximize the number of stats that can be displayed based on the current video format (13 for NTSC, 16 for PAL).

If the number of stats is equal to or greater than the available display lines, the heading will be suppressed and used instead for an extra stats line.

The entire stats page will be centered vertically based on the screen size determined by the video format.
2019-04-15 20:02:07 -04:00
Krzysztof Matula
b8b5b133dc OSD timers safety - code review changes 2019-04-15 23:25:58 +02:00
Krzysztof Matula
560f43a9dd undo unnecessary change 2019-04-15 19:29:03 +02:00
Krzysztof Matula
8103d55c7d odometer on post flight screen - code review 2019-04-15 19:25:40 +02:00
Krzysztof Matula
a56ac05303 Revert "Prevent crashing when OSD timers are configured incorrectly."
This reverts commit db2f3641c92a7db1aec93581592861860f292b23.
2019-04-15 18:57:36 +02:00
ianrmurphy
11dd4e7598 Added warnings for RSSI and Link Quality, added Link Quality alarm. 2019-04-15 00:24:20 +01:00
Krzysztof Matula
0e5b9cdd5c Prevent crashing when OSD timers are configured incorrectly. 2019-04-15 00:26:52 +02: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
mikeller
760a524027 Fixed tests, added crash indication. 2019-04-05 08:39:23 +13:00
Bruce Luckcuck
138f403204 Fix OSD stats alignment and formatting
Fixes the alignment and formatting of the following stats:
* Max altitude
* Max speed
* Max ESC temperature
2019-03-26 13:37:21 -04: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