mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-28 19:48:31 -04:00
AP_Notify: Use HAL_CANMANAGER_ENABLED instead of HAL_ENABLE_LIBUAVCAN_DRIVERS
This commit is contained in:
parent
1a2c51d6df
commit
895039cdce
@ -94,7 +94,7 @@ AP_Notify *AP_Notify::_singleton;
|
||||
#endif // BUILD_DEFAULT_LED_TYPE
|
||||
|
||||
#ifndef BUZZER_ENABLE_DEFAULT
|
||||
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
|
||||
#if HAL_CANMANAGER_ENABLED
|
||||
// Enable Buzzer messages over UAVCAN
|
||||
#define BUZZER_ENABLE_DEFAULT (Notify_Buzz_Builtin | Notify_Buzz_UAVCAN)
|
||||
#else
|
||||
@ -320,9 +320,9 @@ void AP_Notify::add_backends(void)
|
||||
#endif
|
||||
break;
|
||||
case Notify_LED_UAVCAN:
|
||||
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
|
||||
#if HAL_CANMANAGER_ENABLED
|
||||
ADD_BACKEND(new UAVCAN_RGB_LED(0));
|
||||
#endif // HAL_ENABLE_LIBUAVCAN_DRIVERS
|
||||
#endif // HAL_CANMANAGER_ENABLED
|
||||
break;
|
||||
|
||||
case Notify_LED_Scripting:
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_Notify/AP_Notify.h>
|
||||
|
||||
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
|
||||
#if HAL_CANMANAGER_ENABLED
|
||||
#include <AP_UAVCAN/AP_UAVCAN.h>
|
||||
#include <AP_CANManager/AP_CANManager.h>
|
||||
#endif
|
||||
@ -64,7 +64,7 @@ void MMLPlayer::start_note(float duration, float frequency, float volume)
|
||||
_note_duration_us = duration*1e6;
|
||||
hal.util->toneAlarm_set_buzzer_tone(frequency, volume, _note_duration_us/1000U);
|
||||
|
||||
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
|
||||
#if HAL_CANMANAGER_ENABLED
|
||||
// support CAN buzzers too
|
||||
uint8_t can_num_drivers = AP::can().get_num_drivers();
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_HAL/system.h>
|
||||
|
||||
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
|
||||
#if HAL_CANMANAGER_ENABLED
|
||||
#include "UAVCAN_RGB_LED.h"
|
||||
|
||||
#include <AP_UAVCAN/AP_UAVCAN.h>
|
||||
|
Loading…
Reference in New Issue
Block a user