2016-02-17 21:25:26 -04:00
|
|
|
#pragma once
|
2014-11-15 06:25:55 -04:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include <AP_HAL/AP_HAL.h>
|
2014-11-15 06:25:55 -04:00
|
|
|
|
2016-07-29 16:14:02 -03:00
|
|
|
namespace Linux {
|
|
|
|
|
|
|
|
class ToneAlarm {
|
2014-11-15 06:25:55 -04:00
|
|
|
public:
|
|
|
|
ToneAlarm();
|
2016-03-10 08:46:47 -04:00
|
|
|
virtual bool init();
|
2018-08-01 07:16:19 -03:00
|
|
|
virtual void set_buzzer_tone(float frequency, float volume, uint32_t duration_ms);
|
2016-01-10 08:17:33 -04:00
|
|
|
|
|
|
|
private:
|
2014-11-15 06:25:55 -04:00
|
|
|
int32_t period_fd;
|
|
|
|
int32_t duty_fd;
|
|
|
|
int32_t run_fd;
|
|
|
|
};
|
2016-07-29 16:14:02 -03:00
|
|
|
|
|
|
|
}
|