sketchbook
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Alarms.h
Go to the documentation of this file.
1 #ifndef ALARMS_H_
2 #define ALARMS_H_
3 
4 void blinkLED(uint8_t num, uint8_t ontime,uint8_t repeat);
5 uint8_t isBuzzerON(void);
6 void alarmHandler(void);
7 void vario_signaling(void);
8 void i2CLedRingState(void);
9 void blinkLedRing(void);
11 void init_led_flasher();
12 void led_flasher_set_sequence(uint8_t s);
14 void init_landing_lights(void);
16 void PilotLamp(uint8_t count);
17 
18 /*
19 AlarmArray
20 0: toggle
21 1: failsafe
22 2: noGPS
23 3: beeperOn
24 4: pMeter
25 5: runtime
26 6: vBat
27 7: confirmation
28 8: Acc
29 9: I2C Error
30 */
31 enum alrm_fac {
42  ALRM_FAC_SIZE, // MUST be LAST - used for size of array alarmArray
43  };
44 
45 
46 /*
47 Resources:
48 0: onboard LED
49 1: Buzzer
50 2: PL GREEN
51 3: PL BLUE
52 4: PL RED
53 */
54 enum alrm_res {
62 };
63 
67 };
71  };
76 };
77 #if GPS
78  enum alrm_lvl_gps {
79  ALRM_LVL_GPS_NOFIX = 2,
80  };
81 #endif
82 #ifdef VBAT
83  enum alrm_lvl_vbat {
84  ALRM_LVL_VBAT_INFO = 1,
85  ALRM_LVL_VBAT_WARN ,
86  ALRM_LVL_VBAT_CRIT ,
87  };
88 #endif
93 };
94 
95 #define SET_ALARM(fac, level) alarmArray[fac] = level
96 #ifdef BUZZER
97  #define SET_ALARM_BUZZER(fac, level) SET_ALARM( fac, level)
98 #else
99  #define SET_ALARM_BUZZER(fac, level)
100 #endif
101 
102 #define IS_ALARM_SET(fac, level) ( alarmArray[fac] == level )
103 
104 #endif /* ALARMS_H_ */
Definition: Alarms.h:40
void vario_signaling(void)
Definition: Alarms.h:38
Definition: Alarms.h:36
void i2CLedRingState(void)
alrm_lvl_onoff
Definition: Alarms.h:64
void alarmHandler(void)
Definition: Alarms.cpp:56
Definition: Alarms.h:60
Definition: Alarms.h:59
alrm_lvl_failsafe
Definition: Alarms.h:68
Definition: Alarms.h:92
alrm_lvl_toggle
Definition: Alarms.h:72
void led_flasher_set_sequence(uint8_t s)
Definition: Alarms.h:33
Definition: Alarms.h:90
Definition: Alarms.h:58
void blinkLedRing(void)
Definition: Alarms.h:70
void init_landing_lights(void)
uint8_t isBuzzerON(void)
Definition: Alarms.cpp:30
Definition: Alarms.h:35
Definition: Alarms.h:61
alrm_lvl_confirm
Definition: Alarms.h:89
Definition: Alarms.h:56
Definition: Alarms.h:91
void auto_switch_led_flasher()
tuple s
Definition: ser-mon-AS7265X.py:36
Definition: Alarms.h:39
Definition: Alarms.h:41
Definition: Alarms.h:37
Definition: Alarms.h:66
Definition: Alarms.h:32
Definition: Alarms.h:73
void auto_switch_landing_lights(void)
Definition: Alarms.h:65
unsigned int count
Definition: Uno_Dragino_LoRa_GPS_Shield_TTN.ino:97
Definition: Alarms.h:55
void led_flasher_autoselect_sequence()
void blinkLED(uint8_t num, uint8_t ontime, uint8_t repeat)
Definition: Alarms.cpp:327
Definition: Alarms.h:57
Definition: Alarms.h:42
Definition: Alarms.h:75
Definition: Alarms.h:74
void init_led_flasher()
void PilotLamp(uint8_t count)
Definition: Alarms.h:34
Definition: Alarms.h:69
alrm_res
Definition: Alarms.h:54
alrm_fac
Definition: Alarms.h:31