AP_Notify: New parameter to enable/disable buzzer
This commit is contained in:
parent
5861b754cc
commit
c9862b1502
@ -41,6 +41,13 @@ const AP_Param::GroupInfo AP_Notify::var_info[] = {
|
||||
// @User: Advanced
|
||||
AP_GROUPINFO("LED_BRIGHT", 0, AP_Notify, _rgb_led_brightness, RGB_LED_HIGH),
|
||||
|
||||
// @Param: BUZZ_ENABLE
|
||||
// @DisplayName: Buzzer enable
|
||||
// @Description: Enable or disable the buzzer. Only for Linux and PX4 based boards.
|
||||
// @Values: 0:Disable,1:Enable
|
||||
// @User: Advanced
|
||||
AP_GROUPINFO("BUZZ_ENABLE", 1, AP_Notify, _buzzer_enable, BUZZER_ON),
|
||||
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
||||
|
@ -31,6 +31,8 @@
|
||||
#define RGB_LED_LOW 1
|
||||
#define RGB_LED_MEDIUM 2
|
||||
#define RGB_LED_HIGH 3
|
||||
#define BUZZER_ON 1
|
||||
#define BUZZER_OFF 0
|
||||
|
||||
class AP_Notify
|
||||
{
|
||||
@ -97,8 +99,10 @@ public:
|
||||
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
bool buzzer_enabled() const { return _buzzer_enable; }
|
||||
private:
|
||||
static NotifyDevice* _devices[];
|
||||
|
||||
AP_Int8 _rgb_led_brightness;
|
||||
AP_Int8 _buzzer_enable;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user