Skip to content

Commit 3999b26

Browse files
authored
Merge pull request #6 from stylesuxx/chore/readme-formatting
Updated README
2 parents b6871fa + a94d9da commit 3999b26

File tree

1 file changed

+56
-26
lines changed

1 file changed

+56
-26
lines changed

README.md

Lines changed: 56 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,52 @@
11
# DisplayPort OSD Framebuffer
22

3-
This takes Betaflight MSP DisplayPort (so-called "canvas" although this is a misnomer as there is another Betaflight "canvas" mode for Pixel OSDs) messages through UDP and, using a font provided at `font.bin`, renders them to a framebuffer.
3+
This takes Betaflight MSP DisplayPort (so-called "canvas" although this is a misnomer as there is another Betaflight "canvas" mode for Pixel OSDs) messages through UDP and, using a font provided at `/blackbox/font.bin`, renders them to a framebuffer.
44

5-
A custom `font.bin` may be placed on the root of the SD card, at which point it will override the font in /blackbox.
5+
A custom `font.bin` may be placed on the root of the goggles SD card, at which point it will override the font in `/blackbox/font.bin`.
66

7-
SFML and DJI viewports available, as well as a mux which creates a pty and provides filtered MSP access, and reroutes DisplayPort messages to UDP.
7+
SFML and DJI viewports are available, as well as a *mux* which creates a *pty* and provides filtered MSP access, and reroutes DisplayPort messages to UDP.
88

9-
To build for DJI, install the Android NDK and add the NDK toolchain to your PATH, then use make -f Makefile.dji . Set DJI_LIB_PATH to a path to the content of `/system/lib` pulled from your DJI hardware or a firmware dump, so that the linker can find `libduml_hal.so`. On Windows, note that `make` and the actual `armv7a-linux-*` compiler binaries may be installed in different directories.
9+
To build for DJI, install the [Android NDK](https://developer.android.com/ndk/downloads) and add the NDK toolchain to your PATH, then use `make -f Makefile.dji` to build the targets. Set `DJI_LIB_PATH` to point to the content of `/system/lib` pulled from your DJI hardware or a firmware dump, so that the linker can find `libduml_hal.so`.
1010

11-
To build for UNIXes, install CSFML and make -f Makefile.unix .
11+
> On Windows, note that `make` and the actual `armv7a-linux-*` compiler binaries may be installed in different directories.
12+
13+
To build for UNIXes, install CSFML and run:
14+
15+
```
16+
make -f Makefile.unix
17+
```
1218

1319
Provided targets and tools are:
1420

1521
* `msp_displayport_mux` - takes MSP DisplayPort messages, bundles each frame (all DisplayPort messages between Draw commands) into a single UDP Datagram, and then blasts it over UDP. Also creates a PTY which passes through all _other_ MSP messages, for `dji_hdvt_uav` to connect to.
16-
* `osd_dji` - Listens for these MSP DisplayPort messages over UDP and blits them to a DJI framebuffer screen using the DJI framebuffer HAL `libduml_hal` access library, and a converted Betaflight font font stored in `font.bin` .
17-
* `osd_sfml` - The same thing as `osd_dji`, but for a desktop PC using SFML and `bold.png` .
22+
* `osd_dji` - Listens for these MSP DisplayPort messages over UDP and blits them to a DJI framebuffer screen using the DJI framebuffer HAL `libduml_hal` access library, and a converted Betaflight font font stored in `font.bin`.
23+
* `osd_sfml` - The same thing as `osd_dji`, but for a desktop PC using SFML and `bold.png`.
24+
25+
## Installation
26+
27+
Build the needed targets:
28+
29+
```
30+
make -f Makefile.dji msp_displayport_mux
31+
make -f Makefile.dji osd_dji
32+
```
1833

19-
# Installation
34+
### Flight Controller
2035

21-
On your flight controller:
36+
* Ensure that the correct UART is set to use MSP
37+
* Enable MSP DisplayPort
2238

23-
* Ensure that the correct UART is set to use MSP.
24-
* Enable MSP DisplayPort. On Betaflight, this is done using the following commands:
25-
* `set osd_displayport_device = MSP`
26-
* `set displayport_msp_serial = <ConfiguratorUART - 1>` - for example, if the Configurator says UART2, the value here is `1`.
39+
On Betaflight, this is done using the following commands:
40+
41+
```
42+
set osd_displayport_device = MSP
43+
set displayport_msp_serial = <ConfiguratorUART - 1>
44+
```
45+
46+
> Eg.: If the Configurator says UART2, the value for **<ConfiguratorUART - 1>** is **1**.
47+
48+
### Air Unit / Air Unit Lite (Vista)
2749

28-
On Air Unit / Air Unit Lite (Vista):
2950
```
3051
adb push msp_displayport_mux /blackbox
3152
setprop dji.hdvt_uav_service 0
@@ -38,7 +59,7 @@ Optionally, you can add `-f`, like `nohup /blackbox/msp_displayport_mux -f 192.1
3859

3960
Now you can try `setprop dji.hdvt_uav_service 1` - depending on your FC it may or may not be able to handle the volume of MSP messages as well as DisplayPort at the same time.
4061

41-
On goggles:
62+
### Goggles
4263

4364
```
4465
adb push osd_dji /blackbox
@@ -49,30 +70,39 @@ nohup ./osd_dji &
4970

5071
Hold the BACK button for 5 seconds. You should see the DJI UI disappear and be replaced by the MSP OSD (or at least a `WAITING` message at the bottom of your screen).
5172

52-
To restart the DJI goggles, hold the BACK button for 5 seconds again.
73+
To restart the DJI goggles, hold the BACK button for 5 seconds again.
5374

5475
Rebooting will kill the process and return the goggles to "normal."
5576

56-
Enjoy.
77+
Enjoy.
5778

58-
# FAQ / Suggestions
79+
## FAQ / Suggestions
5980

60-
* Why can't we keep dji_glasses (the Goggles UI) running while we render the OSD?
81+
### Why can't we keep dji_glasses (the Goggles UI) running while we render the OSD?
6182

62-
Access to the DJI video driver is exclusive. We'd have to build some kind of userspace frame-buffer sharing system to get this to work. The `dji_glasses` system uses DirectFB which provides this on paper, functionality, but the DJI backend driver as well as the overall stack aren't configured to use it properly.
83+
Access to the DJI video driver is exclusive. We would have to build some kind of userspace frame-buffer sharing system to get this to work. The `dji_glasses` system uses DirectFB which provides this functionality on paper, but the DJI backend driver as well as the overall stack are not configured to use it properly.
6384

64-
* I can't change channels / see my bitrate / record video / etc. while the overlay is running?
85+
### I can't change channels / see my bitrate / record video / etc. while the overlay is running?
6586

66-
See above - `dji_glasses` has three primary purposes: turning user input into commands for the radio/CP layer, displaying UI, and, for whatever reason, recording video. Without dji_glasses running we will have to replicate these functionalities.
87+
See above - `dji_glasses` has three primary purposes:
88+
1. turning user input into commands for the radio/CP layer
89+
2. displaying the UI
90+
3. for whatever reason, recording video
6791

68-
* How do I create a new font (for iNav, Ardupilot, etc.)?
92+
Without `dji_glasses` running we will have to replicate these functionalities.
6993

70-
https://github.com/bri3d/mcm2img , `python3 mcm2img.py mcmfile.mcm font.bin RGBA`
94+
### How do I create a new font (for iNav, Ardupilot, etc.)?
95+
96+
Use [mcm2img](https://github.com/bri3d/mcm2img).
97+
98+
```
99+
python3 mcm2img.py mcmfile.mcm font.bin RGBA
100+
```
71101

72-
# Additional Reading / Learning
102+
## Additional Reading / Learning
73103

74104
https://github.com/fpv-wtf/margerine/wiki
75105

76-
# Shoutouts / Thank You
106+
## Shoutouts / Thank You
77107

78108
* http://github.com/fpv-wtf team, for making this all possible and very helpful random bits of advice

0 commit comments

Comments
 (0)