AP_Notify: New parameter to enable/disable buzzer

This commit is contained in:
pepevalbe 2016-03-31 20:18:52 +02:00 committed by Randy Mackay
parent 5861b754cc
commit c9862b1502
2 changed files with 11 additions and 0 deletions

View File

@ -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
};

View File

@ -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;
};