ToneAlarm_Disco.h 460 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include "AP_HAL_Linux.h"
  3. #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO
  4. #include <AP_HAL_Linux/RCOutput_Bebop.h>
  5. #include "ToneAlarm.h"
  6. namespace Linux {
  7. #define TONEALARM_PWM_POWER 20
  8. class ToneAlarm_Disco : public ToneAlarm {
  9. public:
  10. ToneAlarm_Disco();
  11. bool init() override;
  12. void set_buzzer_tone(float frequency, float volume, uint32_t duration_ms) override;
  13. private:
  14. RCOutput_Bebop *bebop_out;
  15. };
  16. }
  17. #endif