mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-28 02:33:58 -04:00
AP_Notify: move to using CANManager library
This commit is contained in:
parent
e1203a1d52
commit
81c7099848
@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user