AP_Notify: text messages and more defines

This commit is contained in:
Andrew Tridgell 2023-04-08 14:27:51 +10:00
parent d3dde1eb14
commit 4a2ad02494
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ bool DroneCAN_RGB_LED::init()
{
const uint8_t can_num_drivers = AP::can().get_num_drivers();
for (uint8_t i = 0; i < can_num_drivers; i++) {
AP_DroneCAN *uavcan = AP_DroneCAN::get_uavcan(i);
AP_DroneCAN *uavcan = AP_DroneCAN::get_dronecan(i);
if (uavcan != nullptr) {
return true;
}
@ -63,7 +63,7 @@ bool DroneCAN_RGB_LED::hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue)
uint8_t can_num_drivers = AP::can().get_num_drivers();
for (uint8_t i = 0; i < can_num_drivers; i++) {
AP_DroneCAN *uavcan = AP_DroneCAN::get_uavcan(i);
AP_DroneCAN *uavcan = AP_DroneCAN::get_dronecan(i);
if (uavcan != nullptr) {
success = uavcan->led_write(_led_index, red, green, blue) || success;
}

View File

@ -69,7 +69,7 @@ void MMLPlayer::start_note(float duration, float frequency, float volume)
uint8_t can_num_drivers = AP::can().get_num_drivers();
for (uint8_t i = 0; i < can_num_drivers; i++) {
AP_DroneCAN *uavcan = AP_DroneCAN::get_uavcan(i);
AP_DroneCAN *uavcan = AP_DroneCAN::get_dronecan(i);
if (uavcan != nullptr &&
(AP::notify().get_buzzer_types() & AP_Notify::Notify_Buzz_UAVCAN)) {
uavcan->set_buzzer_tone(frequency, _note_duration_us*1.0e-6);