NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
beeper.h File Reference
#include "system_calls.h"
#include "common/pt.h"
#include "utype/cbuf.h"
Include dependency graph for beeper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  beeper_entry
 
struct  beeper
 

Enumerations

enum  beeper_command_t {
  BEEPER_NONE = 0, BEEPER_GYRO_CALIBRATED, BEEPER_RX_LOST_LANDING, BEEPER_RX_LOST,
  BEEPER_DISARMING, BEEPER_ARMING, BEEPER_ARMING_GPS_FIX, BEEPER_BAT_CRIT_LOW,
  BEEPER_BAT_LOW, BEEPER_GPS_STATUS, BEEPER_RX_SET, BEEPER_MULTI_BEEPS,
  BEEPER_DISARM_REPEAT, BEEPER_ACC_CALIBRATION, BEEPER_ACC_CALIBRATION_FAIL, BEEPER_READY_BEEP,
  BEEPER_ARMED, BEEPER_MORSE
}
 

Functions

void beeper_init (struct beeper *self, const struct system_calls *system)
 Initializes defaults for beeper function. More...
 
void beeper_write (struct beeper *self, const char *text)
 Write any text to the beeper (will be sent as morse) More...
 
bool beeper_start (struct beeper *self, beeper_command_t cmd)
 Puts beeper into a new beep state. More...
 
void beeper_stop (struct beeper *self)
 Aborts current beeper function. More...
 
void beeper_update (struct beeper *self)
 Updates beeper state. More...
 

Enumeration Type Documentation

Enumerator
BEEPER_NONE 

Silence, see beeperSilence()

BEEPER_GYRO_CALIBRATED 
BEEPER_RX_LOST_LANDING 

Beeps SOS when armed and TX is turned off or signal lost (autolanding/autodisarm)

BEEPER_RX_LOST 

Beeps when TX is turned off or signal lost (repeat until TX is okay)

BEEPER_DISARMING 

Beep when disarming the board.

BEEPER_ARMING 

Beep when arming the board.

BEEPER_ARMING_GPS_FIX 

Beep a special tone when arming the board and GPS has fix.

BEEPER_BAT_CRIT_LOW 

Longer warning beeps when battery is critically low (repeats)

BEEPER_BAT_LOW 

Warning beeps when battery is getting low (repeats)

BEEPER_GPS_STATUS 

Beep used for indicating changed gps status (such as sattelites being aquired)

BEEPER_RX_SET 

Beeps when aux channel is set for beep or beep sequence how many satellites has found if GPS enabled.

BEEPER_MULTI_BEEPS 

multiple 20ms beeps

BEEPER_DISARM_REPEAT 

Beeps sounded while stick held in disarm position.

BEEPER_ACC_CALIBRATION 

ACC inflight calibration completed confirmation.

BEEPER_ACC_CALIBRATION_FAIL 

ACC inflight calibration failed.

BEEPER_READY_BEEP 

Ring a tone when GPS is locked and ready.

BEEPER_ARMED 

Warning beeps when board is armed (repeats until board is disarmed or throttle is increased)

BEEPER_MORSE 

use the morse buffer to telegraph text

Function Documentation

void beeper_init ( struct beeper self,
const struct system_calls system 
)

Initializes defaults for beeper function.

bool beeper_start ( struct beeper self,
beeper_command_t  cmd 
)

Puts beeper into a new beep state.

void beeper_stop ( struct beeper self)

Aborts current beeper function.

void beeper_update ( struct beeper self)

Updates beeper state.

Beeper handler function to be called periodically in loop. Updates beeper state via time schedule.

void beeper_write ( struct beeper self,
const char *  text 
)

Write any text to the beeper (will be sent as morse)