DeltaFlight is a temporary fork of iNav, with the main goal of adding more flexibility in motor placements and configurations, enabling unique drone designs that would otherwise be impossible.
Development on Windows
To get started developing DeltaFlight on Windows, there's a couple steps you'll need to follow.
- First, enable Windows Subsystem for Linux 2 by following this guide. I recommend installing the Ubuntu distribution if you're not too familiar with Linux.
- Once you've got WSL 2 installed, you need to install the required packages for building DeltaFlight. You can do that by just running
sudo apt update && sudo apt upgrade -y && sudo apt install -y git cmake make ruby gcc.
- Next, install the CLion IDE from JetBrains. You may need to make an account using your GMU email and get the education pack, but it should be free.
- GMU GitLab requires SSH keys to checkout projects to ensure better security. If you don't already have an SSH keypair set up, you can follow this guide to generate a keypair and add it to your account in GMU GitLab.
- Open CLion. Once you log in with your JetBrains account, it should bring up a window asking you if you want to create a new project, open an existing one, or get from VCS. We want to checkout our project from GMU GitLab, so click on that one. When prompted to enter a URL, paste in
firstname.lastname@example.org:deltaflight/deltaflight.git. If you set up your keypair correctly, it should finish cloning the repository without any errors.
- You now need to configure your toolchain. This guide from JetBrains shows how to set up the toolchain correctly (start from step 3, steps 1 and 2 are just how to enable WSL2)
- Once you finish setting up the toolchain and press "OK" to close the settings window, CLion should automatically start downloading the rest of the tools and building the project for you. It may take quite a while, but once it's finished with the initial build, the list of possible make targets/targeted boards should appear as a drop-down menu in the upper right near the "Build" hammer icon. Select a compatible board (I'm using MATEKF405SE as a placeholder until we add PixHawk v1 suppport) and click the build icon. CLion should build DeltaFlight for the selected board and spit out a .hex file in the
- Congratulations! You've successfully configured CLion to build DeltaFlight and should now be able to take full advantage of all the code completion and navigation features CLion has.
Development on Linux
Development on Linux is significantly easier to set up. Install your distribution's packages for
gcc, install CLion, then clone the project with CLion. CLion should automatically detect everything and start building DeltaFlight without any further user intervention required.