mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Open Source Flight Controller Firmware
Decoupled mpu6050 acc and gyro detection code. This commit cleans up the #ifdef/#ifndef code which, due to the amount of targets and variants, was starting to get a bit out of hand. Now each acc & gyro is assumed to be used unless the respective USE_ACC_* and USE_GYRO_* is #undef'd at the top of the file by a particular target. This commit also cleans up the mess of re-running all the mpu6050 detection code twice. Now the acc specific communication code is only run once and only code that is actually needed to be run twice is run twice, and the rest of the code is now only used once. This will improve board startup time, albeit negligibly. Sensor alignment is only known for the NAZE target so now the alignment will be ALIGN_DEFAULT for all targets other than NAZE unless they are known. Finally, in the Makefile a file was included twice in the source list for the STM32F3DISCOVERY target and now additional sensors are supported for users that may want to try them on that board. |
||
---|---|---|
lib | ||
obj | ||
src | ||
support | ||
targets/ChebuzzF3 | ||
test | ||
.gitignore | ||
baseflight.uvproj | ||
JLinkSettings.ini | ||
Makefile | ||
README.md | ||
startup_stm32f30x_md_gcc.s | ||
stm32_flash.ld |
Cleanflight
Clean-code version of baseflight flight-controller - flight controllers are used to fly multi-rotor craft and fixed wing craft.
This fork differs from baseflight in that it attempts to use modern software development practices which result in:
- greater reliability through code robustness.
- easier maintainance through code cleanliness.
- easier to develop new features.
- easier to re-use code though code de-coupling and modularisation.
The MultiWii software, from which baseflight originated, violates many good software development best-practices. Hopefully this fork will go some way to address them. If you see any bad code in this fork please immediately raise an issue so it can be fixed, or better yet submit a pull request.
Contributing
Before making any contributions, take a note of the https://github.com/multiwii/baseflight/wiki/CodingStyle
For this fork it is also advised to read about clean code, here are some useful links: