AP_Notify: move to using CANManager library

This commit is contained in:
Siddharth Purohit 2020-05-31 18:04:39 +05:30 committed by Andrew Tridgell
parent e1203a1d52
commit 81c7099848
3 changed files with 7 additions and 7 deletions

View File

@ -283,9 +283,9 @@ void AP_Notify::add_backends(void)
#endif #endif
break; break;
case Notify_LED_UAVCAN: case Notify_LED_UAVCAN:
#if HAL_WITH_UAVCAN #if HAL_ENABLE_LIBUAVCAN_DRIVERS
ADD_BACKEND(new UAVCAN_RGB_LED(0)); ADD_BACKEND(new UAVCAN_RGB_LED(0));
#endif // HAL_WITH_UAVCAN #endif // HAL_ENABLE_LIBUAVCAN_DRIVERS
break; break;
} }

View File

@ -6,9 +6,9 @@
#include <AP_Math/AP_Math.h> #include <AP_Math/AP_Math.h>
#include <AP_Notify/AP_Notify.h> #include <AP_Notify/AP_Notify.h>
#if HAL_WITH_UAVCAN #if HAL_ENABLE_LIBUAVCAN_DRIVERS
#include <AP_UAVCAN/AP_UAVCAN.h> #include <AP_UAVCAN/AP_UAVCAN.h>
#include <AP_BoardConfig/AP_BoardConfig_CAN.h> #include <AP_CANManager/AP_CANManager.h>
#endif #endif
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;
@ -64,7 +64,7 @@ void MMLPlayer::start_note(float duration, float frequency, float volume)
_note_duration_us = duration*1e6; _note_duration_us = duration*1e6;
hal.util->toneAlarm_set_buzzer_tone(frequency, volume, _note_duration_us/1000U); hal.util->toneAlarm_set_buzzer_tone(frequency, volume, _note_duration_us/1000U);
#if HAL_WITH_UAVCAN #if HAL_ENABLE_LIBUAVCAN_DRIVERS
// support CAN buzzers too // support CAN buzzers too
uint8_t can_num_drivers = AP::can().get_num_drivers(); uint8_t can_num_drivers = AP::can().get_num_drivers();

View File

@ -17,12 +17,12 @@
#include <AP_HAL/AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <AP_HAL/system.h> #include <AP_HAL/system.h>
#if HAL_WITH_UAVCAN #if HAL_ENABLE_LIBUAVCAN_DRIVERS
#include "UAVCAN_RGB_LED.h" #include "UAVCAN_RGB_LED.h"
#include <AP_UAVCAN/AP_UAVCAN.h> #include <AP_UAVCAN/AP_UAVCAN.h>
#include <AP_BoardConfig/AP_BoardConfig_CAN.h> #include <AP_CANManager/AP_CANManager.h>
#define LED_OFF 0 #define LED_OFF 0
#define LED_FULL_BRIGHT 255 #define LED_FULL_BRIGHT 255