PX4 Firmware
PX4 Autopilot Software http://px4.io
EngineFailure Class Reference

#include <enginefailure.h>

Inheritance diagram for EngineFailure:
Collaboration diagram for EngineFailure:

Public Member Functions

 EngineFailure (Navigator *navigator)
 
 ~EngineFailure ()=default
 
void on_inactive () override
 This function is called while the mode is inactive. More...
 
void on_activation () override
 This function is called one time when mode becomes active, pos_sp_triplet must be initialized here. More...
 
void on_active () override
 This function is called while the mode is active. More...
 
- Public Member Functions inherited from MissionBlock
 MissionBlock (Navigator *navigator)
 Constructor. More...
 
virtual ~MissionBlock ()=default
 
 MissionBlock (const MissionBlock &)=delete
 
MissionBlockoperator= (const MissionBlock &)=delete
 
- Public Member Functions inherited from NavigatorMode
 NavigatorMode (Navigator *navigator)
 
virtual ~NavigatorMode ()=default
 
 NavigatorMode (const NavigatorMode &)=delete
 
NavigatorMode operator= (const NavigatorMode &)=delete
 
void run (bool active)
 
virtual void on_inactivation ()
 This function is called one time when mode becomes inactive. More...
 

Private Types

enum  EFState { EF_STATE_NONE = 0, EF_STATE_LOITERDOWN = 1 }
 

Private Member Functions

void set_ef_item ()
 Set the DLL item. More...
 
void advance_ef ()
 Move to next EF item. More...
 

Private Attributes

enum EngineFailure::EFState EF_STATE_NONE
 

Additional Inherited Members

- Static Public Member Functions inherited from MissionBlock
static bool item_contains_position (const mission_item_s &item)
 
- Protected Member Functions inherited from MissionBlock
bool is_mission_item_reached ()
 Check if mission item has been reached. More...
 
void reset_mission_item_reached ()
 Reset all reached flags. More...
 
bool mission_item_to_position_setpoint (const mission_item_s &item, position_setpoint_s *sp)
 Convert a mission item to a position setpoint. More...
 
void set_loiter_item (struct mission_item_s *item, float min_clearance=-1.0f)
 Set a loiter mission item, if possible reuse the position setpoint, otherwise take the current position. More...
 
void set_takeoff_item (struct mission_item_s *item, float abs_altitude, float min_pitch=0.0f)
 Set a takeoff mission item. More...
 
void set_land_item (struct mission_item_s *item, bool at_current_location)
 Set a land mission item. More...
 
void set_idle_item (struct mission_item_s *item)
 Set idle mission item. More...
 
void set_vtol_transition_item (struct mission_item_s *item, const uint8_t new_mode)
 Set vtol transition item. More...
 
void mission_apply_limitation (mission_item_s &item)
 General function used to adjust the mission item based on vehicle specific limitations. More...
 
void issue_command (const mission_item_s &item)
 
float get_time_inside (const mission_item_s &item) const
 
float get_absolute_altitude_for_item (const mission_item_s &mission_item) const
 
- Protected Attributes inherited from MissionBlock
mission_item_s _mission_item {}
 
bool _waypoint_position_reached {false}
 
bool _waypoint_yaw_reached {false}
 
bool _waypoint_position_reached_previously {false}
 
hrt_abstime _time_first_inside_orbit {0}
 
hrt_abstime _action_start {0}
 
hrt_abstime _time_wp_reached {0}
 
uORB::Publication< actuator_controls_s_actuator_pub {ORB_ID(actuator_controls_2)}
 
- Protected Attributes inherited from NavigatorMode
Navigator_navigator {nullptr}
 

Detailed Description

Definition at line 47 of file enginefailure.h.

Member Enumeration Documentation

◆ EFState

enum EngineFailure::EFState
private
Enumerator
EF_STATE_NONE 
EF_STATE_LOITERDOWN 

Definition at line 58 of file enginefailure.h.

Constructor & Destructor Documentation

◆ EngineFailure()

EngineFailure::EngineFailure ( Navigator navigator)

Definition at line 55 of file enginefailure.cpp.

◆ ~EngineFailure()

EngineFailure::~EngineFailure ( )
default

Member Function Documentation

◆ advance_ef()

void EngineFailure::advance_ef ( )
private

Move to next EF item.

Definition at line 127 of file enginefailure.cpp.

References NavigatorMode::_navigator, EF_STATE_LOITERDOWN, EF_STATE_NONE, Navigator::get_mavlink_log_pub(), and mavlink_log_emergency.

Referenced by on_activation(), and on_active().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_activation()

void EngineFailure::on_activation ( )
overridevirtual

This function is called one time when mode becomes active, pos_sp_triplet must be initialized here.

Reimplemented from NavigatorMode.

Definition at line 68 of file enginefailure.cpp.

References advance_ef(), EF_STATE_NONE, and set_ef_item().

Here is the call graph for this function:

◆ on_active()

void EngineFailure::on_active ( )
overridevirtual

This function is called while the mode is active.

Reimplemented from NavigatorMode.

Definition at line 76 of file enginefailure.cpp.

References advance_ef(), MissionBlock::is_mission_item_reached(), and set_ef_item().

Here is the call graph for this function:

◆ on_inactive()

void EngineFailure::on_inactive ( )
overridevirtual

This function is called while the mode is inactive.

Reimplemented from NavigatorMode.

Definition at line 62 of file enginefailure.cpp.

References EF_STATE_NONE.

◆ set_ef_item()

Member Data Documentation

◆ EF_STATE_NONE

enum EngineFailure::EFState EngineFailure::EF_STATE_NONE
private

The documentation for this class was generated from the following files: