Adding OSD support for FPV Setups - rotorflight/rotorflight GitHub Wiki

:exclamation: This page is outdated

Rotorflight Wiki is replaced by www.rotorflight.org.


(PAGE IS WORK IN PROGRESS)

Introduction

For those Pilots wanting to add a FPV camera setup to their helicopters, this is the Walk Through for you. Normally Rotorflight Setups don't need a FPV camera. However those wanting to get an OSD for FPV flying will need to follow the following steps. These steps are for an advanced user though. It will potentially require using features of GitHub to fork the current code and compile said code using Ubuntu.

Disclaimer...

This is for FPV setups that have the Video Signal running THROUGH the Flight Controller

This WALK-THROUGH is for STM32 Processor Flight Controllers ONLY with ANALOG FPV systems

Unless there was already a version of the firmware which was compiled for your Flight Controller & Processor, you can skip needing to fork and compile the code yourself.

Fork the code

First step is to Fork the code of the firmware version we want. Usually the latest stable release is recommended, but Release Candidates are also fine. Using your GitHub Account, make a fork of the main Rotorflight Repository

Main Rotorflight Repository: Rotorflight Code Repository

Edit unified target "target.h" to enable OSD

The file "target.h" is located at following file path in your forked code: src/main/target/STM32_UNIFIED/target.h

Use the GitHub Editor to make the following changes.

Comment out the lines #317 and #319 which state the following; (the line numbers may change between firmware versions...)

#undef USE_OSD

#undef USE_MAX7456

Comment out these lines by putting "//" in front of the entire line. See the example below

//#undef USE_OSD

//#undef USE_MAX7456

ONLY COMMENT OUT THESE TWO LINES!!! DO NOT CHANGE ANYTHING ELSE!!!

Save your changes and move on to compiling the code.

Compile Firmware with edited Target

Compile per the directions on the "Compiling the Firmware" Page.

Be sure to navigate to YOUR FORKED DIRECTORY BEFORE COMPILING CODE

Edit Flight Controller Target

Next is configuring the defaults/target for your Flight Controller

Use Rotorflight Target Builder

Use the Target Builder as suggested and add the following lines in the next step

Add OSD Related CLI Commands

By default the Rotorflight Target Builder removes the needed OSD features. These are found in the original Betaflight Target. They are under #RESOURCES, #FEATURE, and #MASTER.

You'll need to find the three following lines from the original Betaflight Target for your specific Flight Controller;

resource OSD_CS 1 A15

feature OSD

set max7456_spi_bus = 3

Take these lines and copy them over to the Rotorflight target. Put them under their respective headers.

NOTE

For the #RESOURCE and #MASTER you will need to copy YOUR exact line. DO NOT COPY AND PASTE THE EXAMPLE ABOVE!!! Each Flight Controller is different.

Flash Compiled Firmware

Flash your Flight Controller with the .hex file you compiled

Load Target

Using the target you created with the Rotorflight Target Builder, load the defaults using CLI

OSD is now Enabled

Check that you have the OSD working by turning on your Helicopter and viewing the Video Stream through your Goggles/Display. Default OSD will show Betaflight Splash Screen when Arming, Warnings during flight, and After Flight Statistics when you disarm.

TO-DO

  • Add How-To for OSD/HUD Configuration