Browse Source

AP_Notify: New parameter to enable/disable buzzer

master
pepevalbe 9 years ago committed by Randy Mackay
parent
commit
c9862b1502
  1. 7
      libraries/AP_Notify/AP_Notify.cpp
  2. 4
      libraries/AP_Notify/AP_Notify.h

7
libraries/AP_Notify/AP_Notify.cpp

@ -41,6 +41,13 @@ const AP_Param::GroupInfo AP_Notify::var_info[] = { @@ -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
};

4
libraries/AP_Notify/AP_Notify.h

@ -31,6 +31,8 @@ @@ -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: @@ -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…
Cancel
Save