mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Notify: fix incorrect buzzer pin type to stop always instantiating
This commit is contained in:
parent
87b47d5ea1
commit
58d03f01ec
@ -194,7 +194,7 @@ public:
|
||||
uint32_t get_text_updated_millis() const {return _send_text_updated_millis; }
|
||||
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
uint8_t get_buzz_pin() const { return _buzzer_pin; }
|
||||
int8_t get_buzz_pin() const { return _buzzer_pin; }
|
||||
uint8_t get_buzz_level() const { return _buzzer_level; }
|
||||
uint8_t get_buzz_volume() const { return _buzzer_volume; }
|
||||
uint8_t get_led_len() const { return _led_len; }
|
||||
|
@ -29,7 +29,7 @@ bool Buzzer::init()
|
||||
return false;
|
||||
}
|
||||
_pin = pNotify->get_buzz_pin();
|
||||
if (_pin == 0u) {
|
||||
if (_pin <= 0) {
|
||||
// no buzzer
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ private:
|
||||
} _flags;
|
||||
|
||||
uint32_t _pattern; // current pattern
|
||||
uint8_t _pin;
|
||||
int8_t _pin;
|
||||
uint32_t _pattern_start_time;
|
||||
|
||||
// enforce minumum 100ms interval between patterns:
|
||||
|
Loading…
Reference in New Issue
Block a user