Skip to content

use DJI FPV OSD element CRAFT_NAME to show warnings and more#6230

Merged
digitalentity merged 5 commits intoiNavFlight:masterfrom
mf0o:DJI_warnings_in_craftname
Nov 14, 2020
Merged

use DJI FPV OSD element CRAFT_NAME to show warnings and more#6230
digitalentity merged 5 commits intoiNavFlight:masterfrom
mf0o:DJI_warnings_in_craftname

Conversation

@mf0o
Copy link

@mf0o mf0o commented Oct 20, 2020

DJI FPV only supports a limited set of OSD items today.
Missing the iNav warnings is very annoying and probably the most critical at the same time.

This feature branch can use the CRAFT_NAME OSD field to show warnings, throttle position, trip distance, 3D speed and efficiency (mAh/KM).
The field CRAFT_NAME inside DJI is limited to 10 characters.
Various functions have been ported and renamed from osd.c to remove symbols and shorten messages.
Not using a new parameter for configuration is intended, to reduce the footprint within iNav if DJI adds features in the future.

summary:

  • configuration can be done through the craft name itself
  • feature gets enabled if the name starts with ":"
  • if name does not start with ":" the craft name will be simply shown
  • each configurable elements is represented by 1 capital letter like:
    • (W)arnings, trip (D)istance, 3D (S)peed, (T)hrottle, (E)fficiency
  • to use warnings, W must be the first character (but it is optional)
  • order of the elements will be preserved, valid examples:
    • set name=:W
    • set name=:WTDES
    • set name=:WEDS
    • set name=:WSE
    • set name=:ES
  • if warnings are present, it will override the other elements
  • each non-warning element will iterate for 3 seconds
  • if only warnings is enabled but none present, nothing will be displayed - DJI by default shows CRAFT_NAME if no name is supplied
  • invalid characters will be handled and shown as UNKOWN_ELEM

appendix:

I captured an example from the goggles screens: screen_grab
inav/issues/5945

(duplicate to PR #6228, where I failed to select the correct branch to commit from)

Thanks to edbighead for inspiration and everybody else who helped a newb 1st pr ;)

@digitalentity digitalentity added this to the 2.6 milestone Oct 31, 2020
@digitalentity
Copy link
Member

@mf0o what's the status of this? Ready to be merged?

@mf0o
Copy link
Author

mf0o commented Oct 31, 2020

@digitalentity actually yes.
I flew around 50km with the last commit on v2.6 and another 60km with the code on v2.5.2 without any issues.
But there has been barely any feedback yet and its kind of a hack. Mainly depends on you, if you want that kind of stuff in the code.
If yes, I would look into some kind of „summary screen“-Feature for future versions as well.

@digitalentity digitalentity merged commit a038627 into iNavFlight:master Nov 14, 2020
@digitalentity digitalentity added the Release Notes Add this when a PR needs to be mentioned in the release notes label Nov 14, 2020
@cmanley cmanley mentioned this pull request Mar 17, 2021
1 task
@cmanley
Copy link

cmanley commented Jul 10, 2022

In the case of DJI, if there are no warnings, what will DJI display if a space character or perhaps some other invisible character is sent instead of nothing? I'm wondering if there is some practical way to get rid of CRAFT_NAME in the OSD when there are no warnings. If DJI does not support that, then perhaps the actual craft name can be displayed using an extension of your syntax e.g.: ":WS:birdy"

@mf0o
Copy link
Author

mf0o commented Jul 10, 2022

@cmanley this was actually handled in 2.6 but the hole DJI OSD implementation has been developed further with more items and configurator integration.
The config via the craft_name isnt even working anymore in 3.0+.
This PR (with a different owner) seems to be the current status: #7098

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release Notes Add this when a PR needs to be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants