30 #include "generated/airframe.h"
33 #include "autopilot.h"
39 #ifndef SAFETY_WARNING_LED
40 #error You must define SAFETY_WARNING_LED to use this module!
45 LED_ON(SAFETY_WARNING_LED);
52 RunXTimesEvery(0, 60, 5, 7, {
LED_TOGGLE(SAFETY_WARNING_LED);});
53 RunXTimesEvery(130, 130, 10, 6, {
LED_TOGGLE(SAFETY_WARNING_LED);});
55 RunXTimesEvery(20, 240, 40, 1, {
LED_ON(SAFETY_WARNING_LED);});
56 RunXTimesEvery(0, 240, 40, 1, {
LED_OFF(SAFETY_WARNING_LED);});
58 RunXTimesEvery(20, 240, 40, 2, {
LED_ON(SAFETY_WARNING_LED);});
59 RunXTimesEvery(0, 240, 40, 2, {
LED_OFF(SAFETY_WARNING_LED);});
61 RunXTimesEvery(20, 240, 40, 3, {
LED_ON(SAFETY_WARNING_LED);});
62 RunXTimesEvery(0, 240, 40, 3, {
LED_OFF(SAFETY_WARNING_LED);});
64 RunXTimesEvery(20, 240, 40, 4, {
LED_ON(SAFETY_WARNING_LED);});
65 RunXTimesEvery(0, 240, 40, 4, {
LED_OFF(SAFETY_WARNING_LED);});
67 RunXTimesEvery(20, 240, 40, 5, {
LED_ON(SAFETY_WARNING_LED);});
68 RunXTimesEvery(0, 240, 40, 5, {
LED_OFF(SAFETY_WARNING_LED);});
72 RunOnceEvery(20, {
LED_TOGGLE(SAFETY_WARNING_LED);});
74 RunXTimesEvery(0, 300, 10, 10, {
LED_TOGGLE(SAFETY_WARNING_LED);});
78 LED_ON(SAFETY_WARNING_LED);
Interface to align the AHRS via low-passed measurements at startup.
#define ROLL_STICK_CENTERED()
#define THROTTLE_STICK_DOWN()
#define PITCH_STICK_CENTERED()
Interface for electrical status: supply voltage, current, battery status, etc.
struct RadioControl radio_control
void led_safety_status_periodic(void)
Periodic function that makes the leds blink in the right pattern for each situation.
Some helper functions to check RC sticks.
void led_safety_status_init(void)
Initialises periodic loop; place more init functions here if expanding driver.
uint16_t vsupply
supply voltage in decivolts
#define YAW_STICK_CENTERED()
arch independent LED (Light Emitting Diodes) API
Simple module to blink LEDs when battery voltage drops below a certain level, radio control is lost o...
struct Electrical electrical
#define MODE_MANUAL
Default RC mode.