From f468602baf8d3eacfa95314ba95e590f553d94c9 Mon Sep 17 00:00:00 2001 From: Francisco Ferreira Date: Wed, 7 Mar 2018 15:55:55 +0000 Subject: [PATCH] AP_Notify: revert wrong commit 228058e0897c381591b8ad542c9909740159f49f Also change the order of logical OR so that led_write in UAVCAN_RGB_LED is called for all UAVCAN instances and not only first one --- libraries/AP_Notify/UAVCAN_RGB_LED.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Notify/UAVCAN_RGB_LED.cpp b/libraries/AP_Notify/UAVCAN_RGB_LED.cpp index 6261c62b89..5f07212c8b 100644 --- a/libraries/AP_Notify/UAVCAN_RGB_LED.cpp +++ b/libraries/AP_Notify/UAVCAN_RGB_LED.cpp @@ -61,7 +61,7 @@ bool UAVCAN_RGB_LED::hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) if (hal.can_mgr[i] != nullptr) { AP_UAVCAN *uavcan = hal.can_mgr[i]->get_UAVCAN(); if (uavcan != nullptr) { - success |= uavcan->led_write(_led_index, red, green, blue); + success = uavcan->led_write(_led_index, red, green, blue) || success; } } }