New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP_MSP: multi screen and stats support for DJI FPV OSD #18396
Conversation
895b217
to
1069965
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Light review only
This is going to be cool.
b379d6a
to
e9f2c9e
Compare
This version does not automatically enable any stats panels but rather gives the user the freedom to enable and place items on screen individually |
e9f2c9e
to
3de5508
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this might need to be rebased on master?
Is it just me or are we blowing a rather large number of parameters that will never be used for all of the |
There seems to be more flashing when in stats mode than should be including "ACRO" which makes no sense... |
I had the same feeling, there also are quite some zombies among the symbols and fonts, so we really have many more "unused" symbols than one might think by looking at the fonts table. |
not sure I understand this?
14 sats when no fix is a known DJI bug, I never really tried to find a hack for it |
3de5508
to
5dc3727
Compare
5dc3727
to
997bcca
Compare
6208cbb
to
fa5a063
Compare
4a35c54
to
180a785
Compare
@@ -43,9 +43,9 @@ const AP_Param::GroupInfo AP_MSP::var_info[] = { | |||
// @Param: _OPTIONS | |||
// @DisplayName: MSP OSD Options | |||
// @Description: A bitmask to set some MSP specific options | |||
// @Bitmask: 0:EnableTelemetryMode, 1: DJIWorkarounds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed on call, better to remove the DJI option, and use backend choice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shellixyz any objections in removing the DJI Workaround option altogether and simply enable all DJI workarounds by default? Users should be unaffected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection 👍
180a785
to
4c21415
Compare
4c21415
to
6955d11
Compare
Tested locally and works well - thanks, merging! |
This adds multiple screens and stats to the DJI MSP Backend.
Support for multiple screens is similar to regular OSD, one has to enable the additional screens with OSDn_ENABLE and switch between them with one of the supported methods defined by OSD_SW_METHOD.
Stats needed a "hack", when a user switches to a screen that has stats enabled with OSDn_STATS_EN = 1, the telemetry for speed, altitude, voltage, current and distance will report min/max values rather than instant values.
The home distance OSD item will alternate every 2 seconds between max home distance and total traveled distance
The message text OSD item will report "STATS hh:mm" where hh:mm is the flight time and just like usual incoming status text messages will be shown with rolling text.
stats panels have to be individually enabled
Note: to get airspeed max rather than gspeed max just like usual one have to set OSDn_ASPEED_EN =1
A possible layout:
OSD2_ENABLE 1.000000
OSD2_STATS_EN 1.000000
OSD2_MESSAGE_EN 1.000000
OSD2_MESSAGE_X 14.000000
OSD2_MESSAGE_Y 3.000000
OSD2_ARMING_EN 1.000000
OSD2_ARMING_X 12.000000
OSD2_ARMING_Y 0.000000
OSD2_ALTITUDE_EN 1.000000
OSD2_ALTITUDE_X 11.000000
OSD2_ALTITUDE_Y 6.000000
OSD2_BATUSED_EN 1.000000
OSD2_BATUSED_X 12.000000
OSD2_BATUSED_Y 11.000000
OSD2_BAT_VOLT_EN 1.000000
OSD2_BAT_VOLT_X 12.000000
OSD2_BAT_VOLT_Y 8.000000
OSD2_CLK_EN 1.000000
OSD2_CLK_X 12.000000
OSD2_CLK_Y 0.000000
OSD2_CURRENT_EN 1.000000
OSD2_CURRENT_X 11.000000
OSD2_CURRENT_Y 9.000000
OSD2_GPSLAT_EN 1.000000
OSD2_GPSLAT_X 9.000000
OSD2_GPSLAT_Y 13.000000
OSD2_GPSLONG_EN 1.000000
OSD2_GPSLONG_X 9.000000
OSD2_GPSLONG_Y 14.000000
OSD2_GSPEED_EN 1.000000
OSD2_GSPEED_X 13.000000
OSD2_GSPEED_Y 5.000000
OSD2_HOMEDIST_EN 1.000000
OSD2_HOMEDIST_X 13.000000
OSD2_HOMEDIST_Y 7.000000
OSD2_RSSI_EN 1.000000
OSD2_RSSI_X 13.000000
OSD2_RSSI_Y 10.000000
yielding