APM:Libraries
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | Friends | List of all members
AP_Notify Class Reference

#include <AP_Notify.h>

Collaboration diagram for AP_Notify:
[legend]

Classes

struct  notify_events_type
 notify_events_type - bitmask of active events. More...
 
struct  notify_flags_and_values_type
 notify_flags_type - bitmask of notification flags More...
 

Public Types

enum  Oreo_LED_Theme { OreoLED_Disabled = 0, OreoLED_Aircraft = 1, OreoLED_Automobile = 2 }
 

Public Member Functions

 AP_Notify ()
 
 AP_Notify (const AP_Notify &other)=delete
 
AP_Notifyoperator= (const AP_Notify &)=delete
 
void init (bool enable_external_leds)
 
void add_backends (void)
 
void update (void)
 update - allow updates of leds that cannot be updated during a timed interrupt More...
 
bool buzzer_enabled () const
 
void set_flight_mode_str (const char *str)
 
const char * get_flight_mode_str () const
 
void send_text (const char *str)
 
const char * get_text () const
 
uint8_t get_buzz_pin () const
 

Static Public Member Functions

static AP_Notifyinstance (void)
 
static void handle_led_control (mavlink_message_t *msg)
 
static void handle_play_tune (mavlink_message_t *msg)
 

Static Public Attributes

static struct notify_flags_and_values_type flags
 
static struct notify_events_type events
 
static const struct AP_Param::GroupInfo var_info []
 

Private Attributes

AP_Int8 _rgb_led_brightness
 
AP_Int8 _rgb_led_override
 
AP_Int8 _buzzer_enable
 
AP_Int8 _display_type
 
AP_Int8 _oreo_theme
 
AP_Int8 _buzzer_pin
 
char _send_text [NOTIFY_TEXT_BUFFER_SIZE]
 
uint32_t _send_text_updated_millis
 
char _flight_mode_str [5]
 

Static Private Attributes

static AP_Notify_instance
 
static NotifyDevice_devices []
 
static uint8_t _num_devices
 

Friends

class RGBLed
 
class Display
 

Detailed Description

Definition at line 38 of file AP_Notify.h.

Member Enumeration Documentation

◆ Oreo_LED_Theme

Enumerator
OreoLED_Disabled 
OreoLED_Aircraft 
OreoLED_Automobile 

Definition at line 55 of file AP_Notify.h.

Constructor & Destructor Documentation

◆ AP_Notify() [1/2]

AP_Notify::AP_Notify ( )

Definition at line 100 of file AP_Notify.cpp.

Here is the call graph for this function:

◆ AP_Notify() [2/2]

AP_Notify::AP_Notify ( const AP_Notify other)
delete

Member Function Documentation

◆ add_backends()

void AP_Notify::add_backends ( void  )

Definition at line 119 of file AP_Notify.cpp.

Referenced by init().

Here is the caller graph for this function:

◆ buzzer_enabled()

bool AP_Notify::buzzer_enabled ( ) const
inline

Definition at line 135 of file AP_Notify.h.

Referenced by ToneAlarm_ChibiOS::update(), ToneAlarm_Linux::update(), and ToneAlarm_PX4::update().

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

◆ get_buzz_pin()

uint8_t AP_Notify::get_buzz_pin ( ) const
inline

Definition at line 146 of file AP_Notify.h.

Referenced by Buzzer::init().

Here is the caller graph for this function:

◆ get_flight_mode_str()

const char* AP_Notify::get_flight_mode_str ( ) const
inline

Definition at line 139 of file AP_Notify.h.

Referenced by Display::update_mode().

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

◆ get_text()

const char* AP_Notify::get_text ( ) const
inline

Definition at line 143 of file AP_Notify.h.

Referenced by Display::update_text().

Here is the caller graph for this function:

◆ handle_led_control()

void AP_Notify::handle_led_control ( mavlink_message_t *  msg)
static

Definition at line 300 of file AP_Notify.cpp.

Referenced by GCS_MAVLINK::handle_common_message().

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

◆ handle_play_tune()

void AP_Notify::handle_play_tune ( mavlink_message_t *  msg)
static

Definition at line 310 of file AP_Notify.cpp.

Referenced by GCS_MAVLINK::handle_common_message().

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

◆ init()

void AP_Notify::init ( bool  enable_external_leds)

Definition at line 262 of file AP_Notify.cpp.

Here is the call graph for this function:

◆ instance()

static AP_Notify* AP_Notify::instance ( void  )
inlinestatic

Definition at line 50 of file AP_Notify.h.

Referenced by GCS::send_statustext().

Here is the caller graph for this function:

◆ operator=()

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

◆ send_text()

void AP_Notify::send_text ( const char *  str)

Definition at line 326 of file AP_Notify.cpp.

Referenced by get_flight_mode_str(), and GCS::send_statustext().

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

◆ set_flight_mode_str()

void AP_Notify::set_flight_mode_str ( const char *  str)

Definition at line 320 of file AP_Notify.cpp.

Referenced by buzzer_enabled().

Here is the caller graph for this function:

◆ update()

void AP_Notify::update ( void  )

update - allow updates of leds that cannot be updated during a timed interrupt

Definition at line 287 of file AP_Notify.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ Display

friend class Display
friend

Definition at line 41 of file AP_Notify.h.

Referenced by add_backends().

◆ RGBLed

friend class RGBLed
friend

Definition at line 40 of file AP_Notify.h.

Member Data Documentation

◆ _buzzer_enable

AP_Int8 AP_Notify::_buzzer_enable
private

Definition at line 155 of file AP_Notify.h.

Referenced by buzzer_enabled().

◆ _buzzer_pin

AP_Int8 AP_Notify::_buzzer_pin
private

Definition at line 158 of file AP_Notify.h.

Referenced by get_buzz_pin().

◆ _devices

NotifyDevice * AP_Notify::_devices
staticprivate

Definition at line 164 of file AP_Notify.h.

Referenced by AP_Notify(), handle_led_control(), handle_play_tune(), init(), and update().

◆ _display_type

AP_Int8 AP_Notify::_display_type
private

Definition at line 156 of file AP_Notify.h.

Referenced by Display::init().

◆ _flight_mode_str

char AP_Notify::_flight_mode_str[5]
private

Definition at line 162 of file AP_Notify.h.

Referenced by get_flight_mode_str(), init(), and set_flight_mode_str().

◆ _instance

AP_Notify * AP_Notify::_instance
staticprivate

Definition at line 150 of file AP_Notify.h.

Referenced by AP_Notify(), and instance().

◆ _num_devices

uint8_t AP_Notify::_num_devices
staticprivate

Definition at line 165 of file AP_Notify.h.

Referenced by add_backends(), AP_Notify(), handle_led_control(), handle_play_tune(), init(), and update().

◆ _oreo_theme

AP_Int8 AP_Notify::_oreo_theme
private

Definition at line 157 of file AP_Notify.h.

Referenced by add_backends().

◆ _rgb_led_brightness

AP_Int8 AP_Notify::_rgb_led_brightness
private

Definition at line 153 of file AP_Notify.h.

Referenced by RGBLed::update_colours().

◆ _rgb_led_override

AP_Int8 AP_Notify::_rgb_led_override
private

Definition at line 154 of file AP_Notify.h.

Referenced by RGBLed::handle_led_control(), RGBLed::set_rgb(), and RGBLed::update().

◆ _send_text

char AP_Notify::_send_text[NOTIFY_TEXT_BUFFER_SIZE]
private

Definition at line 160 of file AP_Notify.h.

Referenced by get_text(), init(), and send_text().

◆ _send_text_updated_millis

uint32_t AP_Notify::_send_text_updated_millis
private

Definition at line 161 of file AP_Notify.h.

Referenced by init(), send_text(), and Display::update_text().

◆ events

struct notify_events_type AP_Notify::events
static

◆ flags

struct notify_flags_and_values_type AP_Notify::flags
static

◆ var_info

const AP_Param::GroupInfo AP_Notify::var_info
static

Definition at line 145 of file AP_Notify.h.

Referenced by AP_Notify().


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