APM:Libraries
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
AP_Relay Class Reference

Class to manage the ArduPilot relay. More...

#include <AP_Relay.h>

Collaboration diagram for AP_Relay:
[legend]

Public Member Functions

 AP_Relay ()
 
 AP_Relay (const AP_Relay &other)=delete
 
AP_Relayoperator= (const AP_Relay &)=delete
 
void init ()
 
void on (uint8_t relay)
 
void off (uint8_t relay)
 
bool enabled (uint8_t relay)
 
void toggle (uint8_t relay)
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Private Attributes

AP_Int8 _pin [AP_RELAY_NUM_RELAYS]
 
AP_Int8 _default
 

Detailed Description

Class to manage the ArduPilot relay.

Definition at line 18 of file AP_Relay.h.

Constructor & Destructor Documentation

◆ AP_Relay() [1/2]

AP_Relay::AP_Relay ( void  )

Definition at line 94 of file AP_Relay.cpp.

Here is the call graph for this function:

◆ AP_Relay() [2/2]

AP_Relay::AP_Relay ( const AP_Relay other)
delete

Member Function Documentation

◆ enabled()

bool AP_Relay::enabled ( uint8_t  relay)
inline

Definition at line 36 of file AP_Relay.h.

Referenced by AP_ServoRelayEvents::do_repeat_relay(), and AP_ServoRelayEvents::do_set_relay().

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

◆ init()

void AP_Relay::init ( void  )

Definition at line 100 of file AP_Relay.cpp.

Here is the call graph for this function:

◆ off()

void AP_Relay::off ( uint8_t  relay)

Definition at line 127 of file AP_Relay.cpp.

Referenced by AP_ServoRelayEvents::do_set_relay(), init(), AP_Camera::relay_pic(), toggle(), AP_Camera::trigger_pic_cleanup(), and AP_Parachute::update().

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

◆ on()

void AP_Relay::on ( uint8_t  relay)

Definition at line 118 of file AP_Relay.cpp.

Referenced by AP_ServoRelayEvents::do_set_relay(), init(), AP_Camera::relay_pic(), toggle(), AP_Camera::trigger_pic_cleanup(), and AP_Parachute::update().

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

◆ operator=()

AP_Relay& AP_Relay::operator= ( const AP_Relay )
delete

◆ toggle()

void AP_Relay::toggle ( uint8_t  relay)

Definition at line 136 of file AP_Relay.cpp.

Referenced by AP_ServoRelayEvents::do_set_relay(), enabled(), and AP_ServoRelayEvents::update_events().

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

Member Data Documentation

◆ _default

AP_Int8 AP_Relay::_default
private

Definition at line 45 of file AP_Relay.h.

Referenced by init().

◆ _pin

AP_Int8 AP_Relay::_pin[AP_RELAY_NUM_RELAYS]
private

Definition at line 44 of file AP_Relay.h.

Referenced by enabled(), init(), off(), on(), and toggle().

◆ var_info

const AP_Param::GroupInfo AP_Relay::var_info
static

Definition at line 41 of file AP_Relay.h.

Referenced by AP_Relay().


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