diff --git a/common/source/docs/common-msp-osd-overview-4.2.rst b/common/source/docs/common-msp-osd-overview-4.2.rst index b6e53cfb11..e7b51bb206 100644 --- a/common/source/docs/common-msp-osd-overview-4.2.rst +++ b/common/source/docs/common-msp-osd-overview-4.2.rst @@ -4,31 +4,22 @@ MSP OSD ======= -ArduPilot supports several types of MSP OSDs using MSP based protocols: +ArduPilot supports several types of MSP OSDs using MSP (MultiWii Serial Protocol) based protocols: - Telemetry based OSDs such as DJI FPV Goggles V1/V2, DJI Goggles RE, FatShark ByteFrost, FatShark SharkByte (before fw 09042021), `MWOSD `__ , etc - - DisplayPort (sometimes incorrectly referred to as CANVAS MODE) based OSD's such as HDZero (previously known as FatShark SharkByte (fw 09042021 and later)), Walksnail, DJI goggles using the `wtf-os `__ firmware and `msdp-osd module `__, and MWOSD's DisplayPort mode/firmware + - DisplayPort based OSD's such as HDZero (previously known as FatShark SharkByte (fw 09042021 and later)), Walksnail, DJI goggles using the `wtf-os `__ firmware and `msdp-osd module `__, and MWOSD's DisplayPort mode/firmware Telemetry based OSDs will render OSD panel items on screen with their own engine, so ArduPilot has no control of how the items look. -Another limit of telemetry based OSDs is that there's no way for ArduPilot to add new panel items at will, it's the vendor's responsibility to add new features by rolling out new firmware releases. -DisplayPort, on the other hand, is an MSP protocol extension that allows to remotely draw text on compatible external OSDs, DisplayPort is also known (incorrectly) as CANVAS MODE. +DisplayPort, on the other hand, is an MSP protocol extension that allows ArduPilot to remotely draw text on compatible external OSDs. DisplayPort is also known (incorrectly) as CANVAS MODE. Basically it’s a remote text only frame buffer that uses local fonts (local to the rendering engine i.e. the OSD hardware) to render strings sent via MSP. Telemetry based OSD =================== -DJI V1 FPV Goggles - - .. image:: ../../../images/msp_dji_fpv_goggles.jpeg - :target: ../_images/msp_dji_fpv_goggles.jpeg +Telemetry based OSDs will render OSD panel items on screen with their own engine, so ArduPilot has no control of how the items look. +Another limit of telemetry based OSDs is that there's no way for ArduPilot to add new panel items at will, it's the vendor's responsibility to add new features by rolling out new firmware releases. - - DJI Goggles RE - - .. image:: ../../../images/msp_dji_goggles_re.jpeg - :target: ../_images/msp_dji_goggles_re.jpeg - Features -------- @@ -41,18 +32,157 @@ Features Configuration ------------- -To enable MSP OSD, set the following parameters ( example using SERIAL port 2 as the port to attach to the DJI Air unit using both TX and RX lines): +To enable telemetry based MSP OSD, set the following parameters ( example using SERIAL port 2 as the port to attach to the DJI Air unit using both TX and RX lines): - :ref:`OSD_TYPE` = 3 if no integrated OSD is being used in order to activate the OSD code. If an integrated OSD is present and the user wishes to have both OSDs , then :ref:`OSD_TYPE` = 1 will activate the on-board OSD as well as providing screens for the MSP OSD function. For example, on vehicles using the DJI goggles/air system for medium range, but still running a long range VTX using the internal OSD for when the vehicle exceeds the range of the HD DJI Goggles. This configuration could use one OSD screen optimized for DJI Goggles, and another for the integrated OSD and the user can switch between them depending on which video system is being viewed. - :ref:`SERIAL2_PROTOCOL` = 33 - - :ref:`MSP_OPTIONS` = 0 (polling mode) + - :ref:`SERIAL2_BAUD` = 115 + - :ref:`MSP_OPTIONS` bit 0 = 0 (Do not EnableTelemetryMode) .. note:: Serial port buad rate default is changed to 115.2Kbaud automatically when setting the above protocol type. However, if the user has previously or subsequently changes the baud, this default will not be used. 115.2Kbaud is required by most video goggle systems. .. note:: DJI Custom OSD must be enabled: in SETTINGS->DISPLAY->CUSTOM OSD menu of goggles +DJI V1 FPV Goggles + + .. image:: ../../../images/msp_dji_fpv_goggles.jpeg + :target: ../_images/msp_dji_fpv_goggles.jpeg + + + DJI Goggles RE + + .. image:: ../../../images/msp_dji_goggles_re.jpeg + :target: ../_images/msp_dji_goggles_re.jpeg + +DisplayPort OSD +=============== + +DisplayPort, is an MSP protocol extension that allows to remotely draw text on compatible external OSDs. DisplayPort is also known (incorrectly) as CANVAS MODE. +Basically it’s a remote text only frame buffer that uses local fonts (local to the rendering engine i.e. the goggles themselves) to render strings sent via MSP. + +Features +-------- + +DisplayPort OSDs can render all the panel items supported by the ArduPilot's onboard OSD. +Features such as multiple screen switching, multiple units and statistics are supported as well. Please refer to the :ref:`onboard OSD documentation ` for more info. DisplayPort based OSDs include: + +- HDZero +- Walksnail +- DJI goggles using the `wtf-os `__ firmware and `msdp-osd module `__, and +- MWOSD's DisplayPort mode/firmware + +Stick commands for accessing HDZero's VTX Menu and Camera Menu, or 0mW mode also work. + +HDZero using ArduPilot custom fonts + +.. image:: ../../../images/msp_osd_displayport.jpg + :target: ../_images/msp_osd_displayport.jpg + + +By setting :ref:`MSP_OPTIONS` bit 2 to 1 (value = 4) one can force ArduPilot to impersonate Betaflight and use a Betaflight compatible font index for the font table integrated in the remote OSD system. This is only required if the remote OSD system does not have an ArduPilot compatible fonts table (such as DJI O3 systems). + +.. note:: the direction arrows will be reversed since ArduPilot and Betaflight use direction arrows in their font tables that are 180 deg different than each other. This can be corrected by using :ref:`OSD_OPTIONS` bit 5 to invert them before sending to OSD. + +MWOSD, Walksnail, and DJI goggles using the wtf-os/msp-osd firmware already support custom fonts locally, and HDZero has an ArduPilot compatible font set. + +Default behavior (:ref:`MSP_OPTIONS` Bit 2 = 0) is to use the ArduPilot font table's indexes. + + +Configuration +------------- + +To enable MSP DisplayPort OSDs (such as HDZero, Walksnail, DJI with WTF-OSD), set the following parameters (using SERIAL port n as the port to attach to the Air unit using both TX and RX lines): + + - :ref:`OSD_TYPE` = 5 + - :ref:`SERIALn_PROTOCOL` = 42 + - :ref:`SERIALn_BAUD` = 115 + - :ref:`MSP_OPTIONS` set bit 0 = 0 (do NOT EnableTelemetryMode) + - :ref:`OSDn_TXT_RES` = 1 (for each enabled OSDn screen) + + .. note:: Serial port baud rate default is changed to 115.2Kbaud automatically when setting the above protocol type. However, if the user has previously changed or subsequently changes the baud, this default will not be used. 115.2Kbaud is required by most video goggle systems. + + +DJI Goggles with WTF-OSD firmware +--------------------------------- + +Depending on existing firmware revision, you can modify the firmware of the DJI goggles with a third party "rooting" and OS replacement that allows using MSP DisplayPort protocol and gives the same capabilities as that of the ArduPilot internal OSD in terms of panel items, screens, and placement. +Find out more about using the `wtf-os `__ firmware and `msdp-osd module `__. + +In addition, you can have either standard definition (SD) fonts, or high definition (HD) fonts, as well as colors for the fonts. The steps required to use this are: + +- Use the `wtf-osd web based configurator `__ configuration buttons on your goggles and air units to: + +#. ``Root`` the goggles and air unit +#. Install ``WTFOS`` +#. Use the "Package Manager" to install the ``msp-osd`` module +#. Install the font package as instructed by the msp-osd readme in the root directory of the goggles SD card +#. Configure :ref:`OSD_TYPE` = 5 and :ref:`SERIAL2_PROTOCOL` = 42 + + +Sets of fonts converted from ArduPilot's standard font sets are provided on the ``msp-osd`` module site, but additional DJI-style SD/HD sets with color icons are available `here `__ + +.. note:: the font set above will need to be renamed and placed in the appropriate subdirectory on the goggle's SD card if using a version after ``mspd-osd`` ver 0.6.7. Follow the readme for whatever version you are using of ``msp-osd``. + + +OSD Panel Item Configuration +============================ + +Each OSD panel item uses a set of three variables to be set: + +- ``OSDn__EN`` - activates the respective panel item on screen "n" when set to 1. +- ``OSDn__X`` and ``OSDn__Y`` set the horizontal and vertical position of the item, starting with ``X = 0`` and ``Y = 0`` in the upper left corner of your screen. + +.. note:: ArduPilot calculates a sensor-less airspeed estimate that is used if no sensor is present or fails. ARSPD_TYPE must be set to zero in order to display this value as the airspeed item, if no sensor is present. + +Display Resolution +------------------ + +If the OSD is capable, you can select to display either the SD or HD fonts using ``OSDx_TXT_RES`` for each OSD screen enabled. 0 = SD (30x16), 1 = HD (50x18), 3 = HD (60x22). + +For HDZero you should set ``OSDx_TXT_RES`` to 0 or 1 for each enabled OSD screen. If you set it to 2, the text displayed will be garbled. + +The SD font's positions are set on a 30x16 X/Y position grid as normal, the HD uses a (1) 50x18 or (2) 60x22 grid. The 50x18 grid has margins at the top/bottom/left/right of the screen before the grid begins. + +Screens and screen switching +---------------------------- + +For multiple screen layouts, each screen's "OSD" parameter label is trailed by a number, starting with "1". For example, ``OSDn__x`` is a parameter "x" associated with screen 1's "ITEM" panel. + +- Set ``OSDn__EN`` =1 to enable screen "n" display of this item. This allows one to set individual items active on one screen but have them switched off on another screen. Up to 4 screens are optionally available, and can be individually enabled. + +- Set parameters ``OSDn_CHAN_MIN`` and ``OSDn_CHAN_MAX`` to adjust RC channel pwm limits to use for switching to a respective screen. Be sure to have the ranges non-overlapping. + +There are different switch-method options to meet individual RC systems switch layout requirements. These can be set by parameter: :ref:`OSD_SW_METHOD`. +The options are: + +- 0 = switches to next screen if the set RC channel's (:ref:`OSD_CHAN`) value is changed +- 1 = directly selects a screen based on the set pwm limits for each respective screen. RC channel value must change for new pwm value to be recognized. +- 2 = toggles screens on a low to high transition of set RC channel. keeps toggling to next screen every second while channel value is kept high + +A limitation of telemetry based OSDs is that there's no way for ArduPilot to add new panel items at will, it's the vendor's responsibility to add new features by rolling out new firmware releases. + +Displaying statistics on a dedicated screen +------------------------------------------- + +Displaying statistics on a dedicated screen requires enabling at least one extra screen by setting the respective ``OSDn_ENABLE`` to 1. +By default, ArduPilot has only one screen active so in a typical setup one would set (:ref:`OSD2_ENABLE`) = 1 and then enabling the OSD stats panel on screen 2 by setting (:ref:`OSD2_STATS_EN`) = 1. + +When the OSD switches to this screen it will check the value of the :ref:`OSD2_STATS_EN` parameter and if enabled it will override the default behavior of the following OSD items: + + - OSDn_MESSAGE will display STATS followed by flight time + - OSDn_ALTITUDE will display max altitude + - OSDn_BAT_VOLT will display min voltage + - OSDn_CURRENT will display max current + - OSDn_GSPEED will display max ground speed (or airspeed if ``OSDn_ASPEED_EN`` is set to 1) + - OSDn_HOMEDIST will alternates max distance from home and total traveled distance every 2 seconds + - OSDn_RSSI will display min rssi + OSD Panel Items --------------- +Telemetry based OSDs such as DJI FPV Goggles V1/V2, DJI Goggles RE, `MWOSD `__ only support a restricted subset of the full list of available OSD elements. +MSP DisplayPort OSDs are not limited and support the full set of OSD elements please refer to the :ref:`onboard OSD documentation ` for more info. + +These are the OSD elements supported on telemetry based OSDs. +---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | OSD Parameter | Notes | @@ -114,114 +244,6 @@ OSD Panel Items | OSDn_WIND | Please refer to OSDn_MESSAGE for wind speed and direction rendering | +---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -OSD Panel Item Configuration ----------------------------- - -Each OSD panel item uses a set of three variables to be set: - -- ``OSDn__EN`` - activates the respective panel item on screen "n" when set to 1. -- ``OSDn__X`` and ``OSDn__Y`` set the horizontal and vertical position of the item, starting with ``X = 0`` and ``Y = 0`` in the upper left corner of your screen. - -.. note:: ArduPilot calculates a sensor-less airspeed estimate that is used if no sensor is present or fails. ARSPD_TYPE must be set to zero in order to display this value as the airspeed item, if no sensor is present. - - -Screens and screen switching ----------------------------- - -For multiple screen layouts, each screen's "OSD" parameter label is trailed by a number, starting with "1". For example, ``OSDn__x`` is a parameter "x" associated with screen 1's "ITEM" panel. - -- Set ``OSDn__EN`` =1 to enable screen "n" display of this item. This allows one to set individual items active on one screen but have them switched off on another screen. Up to 4 screens are optionally available, and can be individually enabled. - -- Set parameters ``OSDn_CHAN_MIN`` and ``OSDn_CHAN_MAX`` to adjust RC channel pwm limits to use for switching to a respective screen. Be sure to have the ranges non-overlapping. - -There are different switch-method options to meet individual RC systems switch layout requirements. These can be set by parameter: :ref:`OSD_SW_METHOD`. -The options are: - -- 0 = switches to next screen if the set RC channel's (:ref:`OSD_CHAN`) value is changed -- 1 = directly selects a screen based on the set pwm limits for each respective screen. RC channel value must change for new pwm value to be recognized. -- 2 = toggles screens on a low to high transition of set RC channel. keeps toggling to next screen every second while channel value is kept high - -Displaying statistics on a dedicated screen -------------------------------------------- - -Displaying statistics on a dedicated screen requires enabling at least one extra screen by setting the respective ``OSDn_ENABLE`` to 1. -By default, ArduPilot has only one screen active so in a typical setup one would set (:ref:`OSD2_ENABLE`) = 1 and then enabling the OSD stats panel on screen 2 by setting (:ref:`OSD2_STATS_EN`) = 1. - -When the OSD switches to this screen it will check the value of the :ref:`OSD2_STATS_EN` parameter and if enabled it will override the default behavior of the following OSD items: - - - OSDn_MESSAGE will display STATS followed by flight time - - OSDn_ALTITUDE will display max altitude - - OSDn_BAT_VOLT will display min voltage - - OSDn_CURRENT will display max current - - OSDn_GSPEED will display max ground speed (or airspeed if ``OSDn_ASPEED_EN`` is set to 1) - - OSDn_HOMEDIST will alternates max distance from home and total traveled distance every 2 seconds - - OSDn_RSSI will display min rssi - -DisplayPort OSD -=============== - -HDZero using ArduPilot custom fonts - -.. image:: ../../../images/msp_osd_displayport.jpg - :target: ../_images/msp_osd_displayport.jpg - -Features --------- - -DisplayPort OSDs can render all the panel items supported by the ArduPilot's onboard OSD. -Features such as multiple screen switching, multiple units and statistics are supported as well, please refer to the :ref:`onboard OSD documentation ` for more info. - -By setting :ref:`MSP_OPTIONS` bit 2 to 1 (value = 4) one can force ArduPilot to impersonate Betaflight and use a Betaflight compatible font indexes for the font table integrated in the remote OSD system. - -.. note:: the direction arrows will be reversed since ArduPilot and Betaflight use direction arrows in their font tables that are 180 deg different than each other. This can be corrected by using :ref:`OSD_OPTIONS` bit 5 to invert them before sending to OSD. - -This is required if the remote OSD system does not have an ArduPilot compatible fonts table (such as DJI O3 systems). MWOSD, Walksnail, and DJI goggles using the wtf-os/msp-osd firmware already support custom fonts locally and therefore does not require this hack, while HDZero recently added an ArduPilot compatible font set. - -Default behavior (:ref:`MSP_OPTIONS` = 0) is to use the ArduPilot font table's indexes. - -Stick commands such as for accessing HDZero's VTX Menu also work. - -Configuration -------------- - -To enable MSP DisplayPort OSDs (such as HDZero, Walksnail), set the following parameters (using SERIAL port 2 as the port to attach to the Air unit using both TX and RX lines): - - - :ref:`OSD_TYPE` = 5 - - :ref:`SERIAL2_PROTOCOL` = 42 - - .. note:: Serial port buad rate default is changed to 115.2Kbaud automatically when setting the above protocol type. However, if the user has previously changed or subsequently changes the baud, this default will not be used. 115.2Kbaud is required by most video goggle systems. - -DJI Goggles with WTF-OSD firmware ---------------------------------- - -Depending on existing firmware revision, you can modify the firmware of the DJI goggles with a third party "rooting" and OS replacement that allows using DisplayPort protocol and gives the same capabilities as that of the ArduPilot internal OSD in terms of panel items, screens, and placement. - -In addition, you can have either standard definition (SD) fonts, or high definition (HD) fonts, as well as colors for the fonts. The steps required to use this are: - -- Use the `wtf-osd web based configurator `__ configuration buttons on your goggles and air units to: - -#. ``Root`` the goggles and air unit -#. Install ``WTFOS`` -#. Use the "Package Manager" to install the ``msp-osd`` module -#. Install the font package as instructed by the msp-osd readme in the root directory of the goggles SD card -#. Configure :ref:`OSD_TYPE` = 5 and :ref:`SERIAL2_PROTOCOL` = 42 - - -Sets of fonts converted from ArduPilot's standard font sets are provided on the ``msp-osd`` module site, but additional DJI-style SD/HD sets with color icons are available `here `__ - -.. note:: the font set above will need to be renamed and placed in the appropriate subdirectory on the goggle's SD card if using a version after ``mspd-osd`` ver 0.6.7. Follow the readme for whatever version you are using of ``msp-osd``. - -Display Resolution ------------------- - -If the OSD is capable, you can select to display either the SD or HD fonts using ``OSDx_TXT_RES`` for each OSD screen enabled. 0 = SD (30x16), 1 = HD (50x18), 3 = HD (60x22). - -The SD font's positions are set on a 30x16 X/Y position grid as normal, the HD uses a 50x18 or 60x22 grid. The 50x18 grid has margins at the top/bottom/left/right of the screen before the grid begins. - -.. note:: Mission Planners' OSD setup screen now suuports HD OSD configuration. - - Testing OSD with SITL ===================== MSP OSD functionality can be tested and panel items adjusted without autopilot or video hardware using the :ref:`Software In The Loop (SITL) simulator ` setup. Follow those SITL-Instructions to setup a simulation environment. Run the simulator on current source code using ``--osdmsp`` option to build the OSD code into the simulator. For example, for a plane simulation: @@ -249,15 +271,28 @@ By changing the OSD panel items' parameters, a live update on their placement ca Using Mission Planner to Configure the Layout ============================================= -Mission Planner(MP) has a tab in its CONFIG menu to configure the on-board OSD many autopilots integrate, as well as setup layouts for Displayport OSDs. This same configuration tab can be used to configure the OSD panels. In fact, you can do that while the SITL program and MSP OSD emulation window are active by connecting Mission Planner running on the same computer, or networked computer, to MAVProxy, using this command in MAVProxy: +Mission Planner(MP) has a tab in its CONFIG menu to configure the on-board OSD many autopilots integrate, as well as setup layouts for Displayport OSDs. This same configuration tab can be used to configure the OSD panels. + +.. note:: Mission Planners' OSD setup screen now supports HD OSD configuration. To enable it check "HD Layout" in Editor Options at the top right of the OSD screen you want to change. + +.. image:: ../../../images/MissionPlanner_OSD_HD.gif + :target: ../_images/MissionPlanner_OSD_HD.gif + + +You can change the MSP OSD configuration by connecting Mission Planner to SITL while the MSP OSD emulation window is active. +By doing this, you can adjust and tweak your OSD configuration using SITL without having to worry about overheating your VTX. +Once you are done you can take the OSD parameters you have settled on and move them to your vehicle. + +Mission Planner can be connected running on the same computer, or networked computer, to MAVProxy, using this command in MAVProxy: :: output add :14550 - .. note:: if MP is running on the same PC, the ip address would be 127.0.0.1 (local host address) +For more information about using Mission Planner with SITL Please refer to the :ref:`onboard OSD with SITL documentation ` + Video ===== diff --git a/images/MissionPlanner_OSD_HD.gif b/images/MissionPlanner_OSD_HD.gif new file mode 100644 index 0000000000..051bff36d8 Binary files /dev/null and b/images/MissionPlanner_OSD_HD.gif differ