mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
REVONANO Land and Takeoff uav changes removing abort state.
This commit is contained in:
parent
cdf1b88cc0
commit
bddb9377a4
@ -30,6 +30,7 @@ extern "C" {
|
||||
|
||||
#include <math.h>
|
||||
#include <pid.h>
|
||||
#include <alarms.h>
|
||||
#include <CoordinateConversions.h>
|
||||
#include <sin_lookup.h>
|
||||
#include <pathdesired.h>
|
||||
@ -266,9 +267,11 @@ void VtolLandController::UpdateAutoPilot()
|
||||
fsm->GetYaw(yaw_attitude, yaw);
|
||||
|
||||
int8_t result = UpdateStabilizationDesired(yaw_attitude, yaw);
|
||||
|
||||
if (!result) {
|
||||
fsm->Abort();
|
||||
if (result) {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_OK);
|
||||
} else {
|
||||
pathStatus->Status = PATHSTATUS_STATUS_CRITICAL;
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_WARNING);
|
||||
}
|
||||
|
||||
PathStatusSet(pathStatus);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<xml>
|
||||
<object name="StatusVtolAutoTakeoff" singleinstance="true" settings="false" category="Navigation">
|
||||
<description>Status of a AutoTakeoff autopilot</description>
|
||||
<field name="State" units="" type="enum" elements="1" options="Inactive,CheckState,SlowStart,ThrustUp,Takeoff,Hold,ThrustDown,ThrustOff,Disarmed, Abort" default="0"/>
|
||||
<field name="State" units="" type="enum" elements="1" options="Inactive,CheckState,SlowStart,ThrustUp,Takeoff,Hold,ThrustDown,ThrustOff,Disarmed" default="0"/>
|
||||
<field name="AltitudeAtState" units="m" type="float" elements="10" default="0"/>
|
||||
<field name="StateExitReason" units="" type="enum" elements="10" options="None,ArrivedAtAlt,ZeroThrust,PositionError,Timeout" default="0"/>
|
||||
<field name="AltitudeState" units="" type="enum" elements="1" options="High,Low" default="0"/>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<object name="StatusVtolLand" singleinstance="true" settings="false" category="Navigation">
|
||||
<description>Status of a Vtol landing sequence</description>
|
||||
<field name="State" units="" type="enum" elements="1" options="Inactive,InitAltHold,WtgForDescentRate,AtDescentRate,WtgForGroundEffect,
|
||||
GroundEffect,ThrustDown,ThrustOff,Disarmed, Abort" default="0"/>
|
||||
GroundEffect,ThrustDown,ThrustOff,Disarmed" default="0"/>
|
||||
<field name="AltitudeAtState" units="m" type="float" elements="10" default="0"/>
|
||||
<field name="StateExitReason" units="" type="enum" elements="10" options="None,DescentRateOk,OnGround,BounceVelocity,BounceAccel,LowDescentRate,ZeroThrust,PositionError,Timeout" default="0"/>
|
||||
<field name="targetDescentRate" units="m" type="float" elements="1"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user