mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
LP-549 Make ASWA throttle threshold configurable. Add FlightModeSettings.AlwaysStabilizeWhenArmedThrottleThreshold with default value of 0.2
This commit is contained in:
parent
28ad66502a
commit
885d46c8df
@ -66,7 +66,6 @@
|
||||
#define ASSISTEDCONTROL_BRAKETHRUST_DEADBAND_FACTOR_HI 1.04f
|
||||
|
||||
#define ALWAYSTABILIZEACCESSORY_THRESHOLD 0.05f
|
||||
#define ALWAYSTABILIZETHROTTLE_THRESHOLD 0.2f
|
||||
|
||||
// defined handlers
|
||||
|
||||
@ -500,7 +499,8 @@ static void manualControlTask(void)
|
||||
if (alwaysStabilizedSwitch) {
|
||||
if (acc.AccessoryVal <= -ALWAYSTABILIZEACCESSORY_THRESHOLD) {
|
||||
newAlwaysStabilized = FLIGHTSTATUS_ALWAYSSTABILIZEWHENARMED_FALSE;
|
||||
} else if ((acc.AccessoryVal >= ALWAYSTABILIZEACCESSORY_THRESHOLD) && (cmd.Thrust >= ALWAYSTABILIZETHROTTLE_THRESHOLD)) { // && Thrust (or Throttle?) above threshold
|
||||
} else if ((acc.AccessoryVal >= ALWAYSTABILIZEACCESSORY_THRESHOLD) &&
|
||||
(cmd.Throttle >= modeSettings.AlwaysStabilizeWhenArmedThrottleThreshold)) {
|
||||
newAlwaysStabilized = FLIGHTSTATUS_ALWAYSSTABILIZEWHENARMED_TRUE;
|
||||
}
|
||||
} else {
|
||||
|
@ -82,7 +82,8 @@
|
||||
options="Disabled,Accessory 0,Accessory 1,Accessory 2,Accessory 3"
|
||||
defaultvalue="Disabled"
|
||||
description="For Multirotors. Always stabilize no matter the throttle setting when vehicle is armed. Does not work when vehicle is set to Always Armed."/>
|
||||
|
||||
<field name="AlwaysStabilizeWhenArmedThrottleThreshold" units="%" type="float" elements="1" defaultvalue="0.2"/>
|
||||
|
||||
<field name="ArmedTimeout" units="ms" type="uint16" elements="1" defaultvalue="30000"/>
|
||||
<field name="ArmingSequenceTime" units="ms" type="uint16" elements="1" defaultvalue="1000"/>
|
||||
<field name="DisarmingSequenceTime" units="ms" type="uint16" elements="1" defaultvalue="1000"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user