1.7 KiB
Crash Actions
Crash Actions (crash-actions.lua) augments FS_CRASH_CHECK (Copter/Rover) and CRASH_DETECT (Plane) in firmware v4.8 and later. If crash detection is enabled, this script enables additional, configurable post-crash actions via the following parameters:
CRASH_ACT1: Action type; see definitions below.CRASH_ACT1_INST: Instance number of relay/servo, as required.CRASH_ACT1_TIME: Time in seconds after crash detection to trigger the action.CRASH_ACT2CRASH_ACT2_INSTCRASH_ACT2_TIME- ...and so on, through
CRASH_ACT4.
Configuration
-
Enable
FS_CRASH_CHECK(orCRASH_DETECTfor Plane). -
Set
CRASH_ACTx(wherexis 1-4) to one of the following action types:0: Disable (default)1: Disarm2: Relay off3: Relay on4: Servo min5: Servo trim6: Servo max
-
Set
CRASH_ACTx_INSTto the desired relay number or servo channel (unused for disarm). -
Set
CRASH_ACTx_TIMEto the desired time in seconds after crash detection to trigger the action.
Use Cases
This script was developed for use with large Rovers, where fire risk or other damage could result from an unmitigated mechanical failure or stuck condition. Once a crash is detected, the script can automatically disengage autopilot controlled PTO drives, command a combustion engine to idle, kill ignition, etc.
These features may be less useful on airborne platforms, but the script is vehicle agnostic, should a use case arise.
Advanced Configuration
If more than 4 post-crash actions are desired, edit the script's NUM_CRASH_ACTIONS variable to the desired number of actions. This will increase the number of available CRASH_ACTx parameters accordingly.