Skip to content
Nikhil Parikh edited this page Jul 3, 2021 · 5 revisions

Contributing to Express LRS

Fork, Branch, Code, Bench test, Flight test, then PR

Fork

To contribute to the ExpressLRS codebase, you need to first fork the code. Github has a guide on how to do this here: https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo

Once you have your forked copy, clone down the code to your computer using your favourite git client.

Branch

ExpressLRS adopts a variant of GitFlow (https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow). The are two main branches:

  • master: This is the stable branch where releases are tagged from. The only times that something should be merged to master is for a critical bugfix, or when we're satisfied that develop is stable enough to release our latest changes.
  • develop: This is where all new feature work should be branched from, as well as all non-critical bugfixes.

Basically unless you're fixing a critical defect on the master branch, you should be creating your branch from develop.

Using your favourite git client, change to the develop branch, and then create a new branch off develop (use a branch name that describes your change, i.e. feature/adds-unicorn-magic).

Code

Write your changes. Try and follow the code formatting that exists already so our codebase doesn't end up being an inconsistent mess ;)

When you're done, check that all targets compile using the "Build All" button in platformio. Commit your changes and push to your fork of the repo.

Pull Request

Open a pull request from your feature / fix branch that targets the develop branch in the original repo (i.e. it should be a PR to https://github.com/AlessandroAU/ExpressLRS/tree/develop). For documentation on how to open a PR, see: https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

Solicit Feedback

Post your PR in the #development channel on Discord, and ask devs to review the code. You will also need to test that your change works as expected, and fly your branch. Once everyone is satisfied with the code change, and there has been adequate testing against the branch, one of the repo admins will merge your PR into develop.

Rules

  1. Be Nice

  2. Be Patient - the devs need to sleep, have jobs, families, and also fly quads... they are human

  3. Follow the Rules

License

ExpressLRS falls under the GPLv3 license

What to do?

If you find a bug, or hear talk about a feature on the discord, get your hands dirty! The code is a mix of C and C++, with other languages mixed in for accessory use. Submit a pull request with your code, and work through the problems. Mostly, just look at the discord and ask questions.