From 7baafcd63dd36a738a07a4e056f2786d69b8e997 Mon Sep 17 00:00:00 2001 From: Alexey Bulatov Date: Mon, 18 Nov 2019 19:35:35 +0300 Subject: [PATCH] AP_Notify: set led_off instead 0 Led off value can be differ from 0 if indication is inverted. --- libraries/AP_Notify/RGBLed.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_Notify/RGBLed.cpp b/libraries/AP_Notify/RGBLed.cpp index 5bb9737498..203de11126 100644 --- a/libraries/AP_Notify/RGBLed.cpp +++ b/libraries/AP_Notify/RGBLed.cpp @@ -220,9 +220,9 @@ void RGBLed::update() const uint8_t colour = (current_colour_sequence >> (step*3)) & 7; - _red_des = (colour & RED) ? brightness : 0; - _green_des = (colour & GREEN) ? brightness : 0; - _blue_des = (colour & BLUE) ? brightness : 0; + _red_des = (colour & RED) ? brightness : _led_off; + _green_des = (colour & GREEN) ? brightness : _led_off; + _blue_des = (colour & BLUE) ? brightness : _led_off; set_rgb(_red_des, _green_des, _blue_des); }