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

#include <ToneAlarm_PX4.h>

Inheritance diagram for ToneAlarm_PX4:
[legend]
Collaboration diagram for ToneAlarm_PX4:
[legend]

Classes

struct  Tone
 
struct  tonealarm_type
 tonealarm_type - bitmask of states we track More...
 

Public Member Functions

bool init (void)
 init - initialised the tone alarm More...
 
void update ()
 update - updates led according to timed_updated. Should be called at 50Hz More...
 
void handle_play_tune (mavlink_message_t *msg)
 
- Public Member Functions inherited from NotifyDevice
virtual ~NotifyDevice ()
 
virtual void handle_led_control (mavlink_message_t *msg)
 

Private Member Functions

void play_tone (const uint8_t tone_index)
 play_tune - play one of the pre-defined tunes More...
 
void play_string (const char *str)
 
void stop_cont_tone ()
 
void check_cont_tone ()
 

Private Attributes

int _tonealarm_fd
 
struct ToneAlarm_PX4::tonealarm_type flags
 
bool _have_played_ready_tone: 1
 
int8_t _cont_tone_playing
 
int8_t _tone_playing
 
uint32_t _tone_beginning_ms
 

Static Private Attributes

static const Tone _tones []
 

Additional Inherited Members

- Public Attributes inherited from NotifyDevice
const AP_NotifypNotify
 

Detailed Description

Definition at line 25 of file ToneAlarm_PX4.h.

Member Function Documentation

◆ check_cont_tone()

void ToneAlarm_PX4::check_cont_tone ( )
private

Definition at line 144 of file ToneAlarm_PX4.cpp.

Referenced by update().

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

◆ handle_play_tune()

void ToneAlarm_PX4::handle_play_tune ( mavlink_message_t *  msg)
virtual

Reimplemented from NotifyDevice.

Definition at line 374 of file ToneAlarm_PX4.cpp.

Here is the call graph for this function:

◆ init()

bool ToneAlarm_PX4::init ( void  )
virtual

init - initialised the tone alarm

Implements NotifyDevice.

Definition at line 98 of file ToneAlarm_PX4.cpp.

Here is the call graph for this function:

◆ play_string()

void ToneAlarm_PX4::play_string ( const char *  str)
private

Definition at line 132 of file ToneAlarm_PX4.cpp.

Referenced by handle_play_tune(), play_tone(), and stop_cont_tone().

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

◆ play_tone()

void ToneAlarm_PX4::play_tone ( const uint8_t  tone_index)
private

play_tune - play one of the pre-defined tunes

Definition at line 117 of file ToneAlarm_PX4.cpp.

Referenced by check_cont_tone(), and update().

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

◆ stop_cont_tone()

void ToneAlarm_PX4::stop_cont_tone ( )
private

Definition at line 136 of file ToneAlarm_PX4.cpp.

Referenced by update().

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

◆ update()

void ToneAlarm_PX4::update ( void  )
virtual

update - updates led according to timed_updated. Should be called at 50Hz

Implements NotifyDevice.

Definition at line 156 of file ToneAlarm_PX4.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _cont_tone_playing

int8_t ToneAlarm_PX4::_cont_tone_playing
private

Definition at line 67 of file ToneAlarm_PX4.h.

Referenced by check_cont_tone(), init(), play_tone(), stop_cont_tone(), and update().

◆ _have_played_ready_tone

bool ToneAlarm_PX4::_have_played_ready_tone
private

Definition at line 65 of file ToneAlarm_PX4.h.

Referenced by update().

◆ _tone_beginning_ms

uint32_t ToneAlarm_PX4::_tone_beginning_ms
private

Definition at line 69 of file ToneAlarm_PX4.h.

Referenced by check_cont_tone(), and play_tone().

◆ _tone_playing

int8_t ToneAlarm_PX4::_tone_playing
private

Definition at line 68 of file ToneAlarm_PX4.h.

Referenced by check_cont_tone(), play_tone(), and stop_cont_tone().

◆ _tonealarm_fd

int ToneAlarm_PX4::_tonealarm_fd
private

Definition at line 50 of file ToneAlarm_PX4.h.

Referenced by init(), play_string(), and update().

◆ _tones

const ToneAlarm_PX4::Tone ToneAlarm_PX4::_tones
staticprivate

Definition at line 76 of file ToneAlarm_PX4.h.

Referenced by play_tone().

◆ flags

struct ToneAlarm_PX4::tonealarm_type ToneAlarm_PX4::flags
private

Referenced by init(), and update().


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