mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Auto-disarm on landing impact (#13803)
* Disarm on landing * Changes from review comments, thanks PL * Sorry missed that one * calculate Acc magnitude once only, not multiple times * Include gyro factors as in crashRecovery * Fix bug in CrashRecovery delta gains Add temporary debugs to monitor error and delta inputs * remove 1G subtraction for accMagnitude thanks Karate * Use AccDelta or Jerk - thanks Karate * Revert using Gyro Setpoint and Delta * Fix typo, thanks Mark * increment PG version to 9
This commit is contained in:
parent
8f10f17245
commit
f890287598
16 changed files with 72 additions and 25 deletions
|
@ -266,6 +266,7 @@ static uint16_t cmsx_tpa_breakpoint;
|
|||
static int8_t cmsx_tpa_low_rate;
|
||||
static uint16_t cmsx_tpa_low_breakpoint;
|
||||
static uint8_t cmsx_tpa_low_always;
|
||||
static uint8_t cmsx_ez_landing_disarm_threshold;
|
||||
|
||||
static const void *cmsx_simplifiedTuningOnEnter(displayPort_t *pDisp)
|
||||
{
|
||||
|
@ -610,7 +611,7 @@ static const void *cmsx_profileOtherOnEnter(displayPort_t *pDisp)
|
|||
cmsx_tpa_low_rate = pidProfile->tpa_low_rate;
|
||||
cmsx_tpa_low_breakpoint = pidProfile->tpa_low_breakpoint;
|
||||
cmsx_tpa_low_always = pidProfile->tpa_low_always;
|
||||
|
||||
cmsx_ez_landing_disarm_threshold = pidProfile->ez_landing_disarm_threshold;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -668,6 +669,7 @@ static const void *cmsx_profileOtherOnExit(displayPort_t *pDisp, const OSD_Entry
|
|||
pidProfile->tpa_low_rate = cmsx_tpa_low_rate;
|
||||
pidProfile->tpa_low_breakpoint = cmsx_tpa_low_breakpoint;
|
||||
pidProfile->tpa_low_always = cmsx_tpa_low_always;
|
||||
pidProfile->ez_landing_disarm_threshold = cmsx_ez_landing_disarm_threshold;
|
||||
|
||||
initEscEndpoints();
|
||||
return NULL;
|
||||
|
@ -728,6 +730,7 @@ static const OSD_Entry cmsx_menuProfileOtherEntries[] = {
|
|||
{ "TPA LOW RATE", OME_INT8, NULL, &(OSD_INT8_t) { &cmsx_tpa_low_rate, TPA_LOW_RATE_MIN, TPA_MAX , 1} },
|
||||
{ "TPA LOW BRKPT", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_tpa_low_breakpoint, 1000, 2000, 10} },
|
||||
{ "TPA LOW ALWYS", OME_Bool, NULL, &cmsx_tpa_low_always },
|
||||
{ "EZDISARM THR", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_ez_landing_disarm_threshold, 0, 150, 1} },
|
||||
|
||||
{ "BACK", OME_Back, NULL, NULL },
|
||||
{ NULL, OME_END, NULL, NULL}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue