1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00
Open Source Flight Controller Firmware
Find a file
Dominic Clifton d6c1ce323d BUGFIX - Warning LED / arm prevention code fixes.
The old code was using f.ACC_CALIBRATED to mean 'flash the warning led'
and 'prevent arming'
There was another flag called f.OK_TO_ARM which really meant 'prevent
arming after failsafe unless using a switch to arm' - this meant the
comment in the code was incorrect since it did not mention the switch.
There was code which every ~71 minutes would set f.ACC_CALIBRATED to
FALSE and would toggle the LED, even when flying.
There was code that was run during every cycle that did not need to be
run when armed.
There was code that was run during every cycle which did not need to be
run when waiting for calibration to finish.
The warning light was toggled regardless of actual accelerometer
calibration state.

This commit fixes all that and prevents the user from arming after a
failsafe landing until the system is reset, regardless of wether a
switch is used to arm or not.

This commit also flashes the warning led during barometer calibration
and will not let you arm until it has completed.

Add a 5 second delay on startup to failsafe to prevent failsafe from
activating in the case of TX/RX gear with long bind procedures before
they send out valid data.

Failsafe now only prevents re-arming if a landing was forced.

In the case when you power on your RX without your TX on the beeper
sounds and failsafe warning ligts are activated.  When the FC then
detects a signal the lights go off and you can then arm.
2014-05-22 22:46:54 +01:00
docs BUGFIX - Warning LED / arm prevention code fixes. 2014-05-22 22:46:54 +01:00
lib Adding the first unit test to verify battery voltage calculations based 2014-05-05 15:29:23 +01:00
obj Latest binaries, includes HoTT updates and some serial port changes. 2014-05-22 17:29:35 +01:00
src BUGFIX - Warning LED / arm prevention code fixes. 2014-05-22 22:46:54 +01:00
support Enable automatic reset after (re)flashing, closes issue #19 2013-11-01 22:47:25 +00:00
targets/ChebuzzF3 CHEBUZZF3 - Implement ADC driver for 3 ADC channels. Use STM32F3 linker 2014-05-12 00:17:14 +01:00
test fix include file order on flight imu unit test 2014-05-13 16:22:55 +01:00
.gitignore Updating git ignore list to ignore some common files. 2014-04-08 01:20:44 +01:00
baseflight.uvproj adding rxmsp to uvision project 2014-05-01 12:37:20 +09:00
JLinkSettings.ini imported STM32 multiwii port into baseflight dir 2012-02-16 09:39:58 +00:00
Makefile Update Makefile 2014-05-20 03:53:51 +02:00
README.md Updating readme to point at documentation sources. 2014-05-12 13:32:13 +01:00
startup_stm32f30x_md_gcc.s First commit of port to STM32F3DISCOVERY board. 2014-04-25 01:09:19 +01:00
stm32_flash_f103.ld Merge remote-tracking branch 'multiwii/master' 2014-05-16 00:45:21 +01:00
stm32_flash_f303.ld BUGFIX - Linker script for F10x was not reserving the last 2kb which 2014-05-12 01:36:59 +01:00

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:

  1. greater reliability through code robustness.
  2. easier maintainance through code cleanliness.
  3. easier to develop new features.
  4. 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.

Documentation

There is some documentation here: https://github.com/hydra/cleanflight/tree/master/docs If what you need is not covered then refer to the baseflight documentation. If you still can't find what you need then stop by #multiwii on the Freenode IRC network - irc://irc.freenode.net/#multiwii

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: