Commit Graph

23 Commits

Author SHA1 Message Date
Hydra eb800966d9 CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
borisbstyle c8e7850c3d Betaflight Cleanup targets / docs 2016-02-10 23:09:22 +01:00
ProDrone f0681de53d Updates and feature additions to failsafe system.
- Added failsafe flightmode and rc control box.

To make failsafe procedure a separate flight mode and make it possible
to trigger failsafe with an AUX switch.

- Failsafe mode is activated when failsafe is active.

RC link lost is simulated with the failsafe AUX switch.
When NOT armed: failsafe switch to failsafe mode is shown in GUI (mode
tab).

- Activate failsafe mode with AUX switch.

- Prevent arming when failsafe via AUX switch is active (safety issue).

- Make failsafe disarm if motors armed and throttle was LOW (2D & 3D)
for `failsafe_throttle_low_delay` time (__JustDisarmEvent__).

Applied code changes to effectively add pull request: Make failsafe
disarm if motors armed and throttle low #717.

- Use failsafeIsMonitoring() to actually start monitoring.

- Added `failsafe_kill_switch` to code.

When set to 1 (0 is default), the failsafe switch will instantly disarm
(__KillswitchEvent__) instead of executing the landings procedure.
Arming is NOT locked after
this, so the craft could be re-armed if needed.
This is intended for racing quads where damage and danger must be
minimized in case of a pilot error.

- Added `failsafe_throttle_low_delay`, adapted documentation.

Used to adjust the time throttle level must have been LOW
to _only disarm_ instead of _full failsafe procedure_
(__JustDisarmEvent__).

- Updated the failsafe documentation.

- Re-enable arming at end of failsafe procedure.

At the end of a handled failsafe event, that means: auto-landing,
__JustDisarmEvent__ or __KillswitchEvent__, the RX link is monitored for
valid data.
Monitoring is a part of the failsafe handling, which means the craft is
still in failsafe mode while this is done.
Arming is re-enabled (allowed) when there is a valid RX link for more
then XX seconds, where XX depends on the handled event like this:
1. XX = 30 seconds after auto landing.
2. XX = 3 seconds after __JustDisarmEvent__.
3. XX = 0 seconds after __KillswitchEvent__.

NOTE: When armed via an AUX switch, you will have to switch to the
disarmed position at the very end to be able to re-arm.
The failsafe mode will not end until you do.

- __KillswitchEvent__ has now priority over __JustDisarmEvent__

- Apply rxfail values instantly when failsafe switch is ON

- Added missing cases to display.c

Show M when failsafe is monitoring for RX recovery (AND disarming when
armed with a switch).

===

Reworked the code from counter-based to time-based.

- AUX failsafe switch now has identical behavior to RX loss.

- Added RX failure and RX recovery timing.

- __KillswitchEvent__ skips RX failure detection delay (direct disarm).

===

[UNIT TESTS]

Adapted failsafe related unittests from counter-based to time-based

- Added failsafeOnValidDataFailed() to some tests

- Removed duplicate test setup from rc_controls_unittest.cc

- Removed magic numbers from rx_ranges_unittest.cc and rx_rx_unittest.cc

- Reworked all test-cases for flight_failsafe_unittest.cc
2015-09-04 16:55:40 +02:00
Dominic Clifton aca179c654 Updating failsafe and rx loss detection documentation. 2015-08-03 21:52:25 +01:00
Dominic Clifton 3a334c54fc Revert "Updating failsafe documentation to include details about how failsafe"
This reverts commit 5a05c19bb6.

Fixed by cc5c736362
2015-05-19 21:31:54 +01:00
Dominic Clifton 5a05c19bb6 Updating failsafe documentation to include details about how failsafe
works in combination with other settings and when using failsafe in
conjunction with MOTOR_STOP.

See #912 and #488
2015-05-19 17:50:24 +01:00
Dominic Clifton 022d6247cb Add note to documentation regarding RX sending out channel data on
signal loss that would cause a disarm to be registered by the FC.
2015-04-16 12:52:06 +01:00
Dominic Clifton e51b1b4b14 Updating documentation to reflect new CLI values 2015-04-16 08:59:18 +01:00
Dominic Clifton 20fd7b8491 Merge pull request #565 from mosh1/new_failsafe_defaults
Default failsafe enabled and throttle off when no valid PPM signal is se...
2015-03-30 11:15:25 +01:00
Miha Valencic aedb666909 References cleanflight/cleanflight#631 - added feature FAILSAFE and spellchecked 2015-03-19 09:47:50 +01:00
Dominic Clifton 0e2356bf00 Updating failsafe documentation. 2015-03-14 22:14:39 +01:00
Moshen Chan 55d2ef684d Update with failsafe_throttle default. #488 2015-03-05 18:30:05 -08:00
Dominic Clifton 4945446579 Updating documentation. 2015-01-16 11:33:19 +00:00
Dominic Clifton 301434dae3 Merge pull request #280 from astralisdustin/master
Added failsafe explanation and fixed minor errors
2015-01-09 11:14:57 +00:00
Pim van Pelt bb5d22a8d2 Various formatting and typographic fixes 2015-01-04 00:53:24 +01:00
Dustin 8375831f42 Added failsafe explanation and fixed minor errors
Fixed grammar, typos, and adjusted formatting.  Added additional
explanation on items, and added a step by step instruction to setting
up failsafe for the first time.
2014-12-29 19:58:09 -07:00
Dominic Clifton 4e2b9c22a6 Update failsafe documentation. 2014-12-28 00:49:57 +00:00
Dominic Clifton d60183d91d Normalize all the line endings 2014-09-15 23:40:17 +01:00
Dominic Clifton f61232de13 Update Failsafe.md
formatting.
2014-05-26 19:59:21 +01:00
Dominic Clifton 2bbbd05cc7 Update Failsafe.md 2014-05-26 19:54:30 +01:00
Dominic Clifton 49781b5080 Updating documentation. 2014-05-24 21:04:30 +01:00
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
Dominic Clifton 032202ef8f BUGFIX - Cleanup failsafe system so it works correctly with Serial RX
systems and Parallel PWM/PPM systems.

Added setting for failsafe_max_usec.  Renamed failsafe_detect_threshold
to failsafe_min_usec.

Failsafe now detects when a PPM/PWM RX isn't sending ANY data out on
CH1-4.  See documentation notes regarding Graupner receivers in
Failsafe.md.

Documented failsafe system.
2014-05-15 14:28:57 +01:00