mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
f7b8a57e42
The previous scaling function used in scaleMotor could end up with output values below the neutral point. This patch adds a new scaling mode that will try to scale the output proportionally while still keep all outputs within neutral and max. The user can select three different modes: 1) NoScaling - Only cap the output values between neutral and max. 2) AddAndSubtract - The previous output scaling method, which moves the output values directly proportionally to the amount the max/min motor is out of the limits. 3) ElevateAndCompress - The new mode, which elevates all motor values by the percentage needed to bring the min motor to neutral, and then compress all motor values by the percentage needed to bring the max motor down to max. The motor scaling mode can be selected by setting the FlightModeSettings.MotorScalingMode UAVO field.
97 lines
7.1 KiB
XML
97 lines
7.1 KiB
XML
<xml>
|
|
<object name="FlightModeSettings" singleinstance="true" settings="true" category="Control">
|
|
<description>Settings to control arming and flight mode</description>
|
|
|
|
<field name="Arming" units="" type="enum" elements="1" options="Always Disarmed,Always Armed,Roll Left,Roll Right,Pitch Forward,Pitch Aft,Yaw Left,Yaw Right,Accessory 0,Accessory 1,Accessory 2" defaultvalue="Always Disarmed"/>
|
|
|
|
<!-- Note these options should be identical to those in StabilizationDesired.StabilizationMode -->
|
|
<field name="Stabilization1Settings" units="" type="enum"
|
|
elementnames="Roll,Pitch,Yaw,Thrust"
|
|
options="Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude,AltitudeHold,AltitudeVario,CruiseControl"
|
|
defaultvalue="Attitude,Attitude,AxisLock,Manual"
|
|
limits="%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:RateTrainer:AltitudeHold:AltitudeVario:CruiseControl:Attitude:Rattitude:Acro+:WeakLeveling:VirtualBar; \
|
|
%NE:Rate:RateTrainer:Attitude:AxisLock:WeakLeveling:VirtualBar:Acro+:Rattitude;"
|
|
/>
|
|
<field name="Stabilization2Settings" units="" type="enum"
|
|
elementnames="Roll,Pitch,Yaw,Thrust"
|
|
options="Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude,AltitudeHold,AltitudeVario,CruiseControl"
|
|
defaultvalue="Attitude,Attitude,Rate,Manual"
|
|
limits="%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:RateTrainer:AltitudeHold:AltitudeVario:CruiseControl:Attitude:Rattitude:Acro+:WeakLeveling:VirtualBar; \
|
|
%NE:Rate:RateTrainer:Attitude:AxisLock:WeakLeveling:VirtualBar:Acro+:Rattitude;"
|
|
/>
|
|
<field name="Stabilization3Settings" units="" type="enum"
|
|
elementnames="Roll,Pitch,Yaw,Thrust"
|
|
options="Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude,AltitudeHold,AltitudeVario,CruiseControl"
|
|
defaultvalue="Rate,Rate,Rate,Manual"
|
|
limits="%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:RateTrainer:AltitudeHold:AltitudeVario:CruiseControl:Attitude:Rattitude:Acro+:WeakLeveling:VirtualBar; \
|
|
%NE:Rate:RateTrainer:Attitude:AxisLock:WeakLeveling:VirtualBar:Acro+:Rattitude;"
|
|
/>
|
|
<field name="Stabilization4Settings" units="" type="enum"
|
|
elementnames="Roll,Pitch,Yaw,Thrust"
|
|
options="Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude,AltitudeHold,AltitudeVario,CruiseControl"
|
|
defaultvalue="Attitude,Attitude,AxisLock,CruiseControl"
|
|
limits="%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:RateTrainer:AltitudeHold:AltitudeVario:CruiseControl:Attitude:Rattitude:Acro+:WeakLeveling:VirtualBar; \
|
|
%NE:Rate:RateTrainer:Attitude:AxisLock:WeakLeveling:VirtualBar:Acro+:Rattitude;"
|
|
/>
|
|
<field name="Stabilization5Settings" units="" type="enum"
|
|
elementnames="Roll,Pitch,Yaw,Thrust"
|
|
options="Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude,AltitudeHold,AltitudeVario,CruiseControl"
|
|
defaultvalue="Attitude,Attitude,Rate,CruiseControl"
|
|
limits="%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:RateTrainer:AltitudeHold:AltitudeVario:CruiseControl:Attitude:Rattitude:Acro+:WeakLeveling:VirtualBar; \
|
|
%NE:Rate:RateTrainer:Attitude:AxisLock:WeakLeveling:VirtualBar:Acro+:Rattitude;"
|
|
/>
|
|
<field name="Stabilization6Settings" units="" type="enum"
|
|
elementnames="Roll,Pitch,Yaw,Thrust"
|
|
options="Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude,AltitudeHold,AltitudeVario,CruiseControl"
|
|
defaultvalue="Rate,Rate,Rate,Manual"
|
|
limits="%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:AltitudeHold:AltitudeVario:CruiseControl; \
|
|
%NE:RateTrainer:AltitudeHold:AltitudeVario:CruiseControl:Attitude:Rattitude:Acro+:WeakLeveling:VirtualBar; \
|
|
%NE:Rate:RateTrainer:Attitude:AxisLock:WeakLeveling:VirtualBar:Acro+:Rattitude;"
|
|
/>
|
|
|
|
<!-- Note these options values should be identical to those defined in FlightMode -->
|
|
<!-- Currently only some modes are enabled for UI using limits attribute per board. Update when more modes will be operational -->
|
|
<field name="FlightModePosition"
|
|
units=""
|
|
type="enum"
|
|
elements="6"
|
|
options="Manual,Stabilized1,Stabilized2,Stabilized3,Stabilized4,Stabilized5,Stabilized6,PositionHold,CourseLock,VelocityRoam,HomeLeash,AbsolutePosition,ReturnToBase,Land,PathPlanner,POI,AutoCruise,AutoTakeoff"
|
|
defaultvalue="Stabilized1,Stabilized2,Stabilized3,Stabilized4,Stabilized5,Stabilized6"
|
|
limits="%NE:POI:AutoCruise; \
|
|
%NE:POI:AutoCruise; \
|
|
%NE:POI:AutoCruise; \
|
|
%NE:POI:AutoCruise; \
|
|
%NE:POI:AutoCruise; \
|
|
%NE:POI:AutoCruise;" />
|
|
|
|
<field name="AlwaysStabilizeWhenArmed" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="FALSE" 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="MotorScalingMode" units="" type="enum" elements="1" options="NoScaling,AddAndSubtract,ElevateAndCompress" defaultvalue="ElevateAndCompress" description="Function to use to scale motors when the motors want to go beyond the end points.one motor wants to go beyond its end points."/>
|
|
<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"/>
|
|
<field name="DisableSanityChecks" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="FALSE"/>
|
|
<field name="ReturnToBaseAltitudeOffset" units="m" type="float" elements="1" defaultvalue="10"/>
|
|
<field name="ReturnToBaseNextCommand" units="" type="enum" elements="1" options="Hold,Land" defaultvalue="Hold"/>
|
|
<field name="LandingVelocity" units="m" type="float" elements="1" defaultvalue="0.6"/>
|
|
<field name="AutoTakeOffVelocity" units="m" type="float" elements="1" defaultvalue="0.6"/>
|
|
<field name="AutoTakeOffHeight" units="m" type="float" elements="1" defaultvalue="2.5" description="height in meters above arming altitude to climb to during autotakeoff"/>
|
|
<field name="PositionHoldOffset" units="m" type="float" elementnames="Horizontal,Vertical" defaultvalue="30,15" description="stick sensitivity for position roam modes"/>
|
|
<field name="VarioControlLowPassAlpha" units="" type="float" elements="1" defaultvalue="0.98" description="stick low pass filter for position roam modes"/>
|
|
<access gcs="readwrite" flight="readwrite"/>
|
|
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
|
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
|
<logging updatemode="manual" period="0"/>
|
|
</object>
|
|
</xml>
|