From cf599952f5df628e8bb758714864d3c33a187e77 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Thu, 3 Sep 2020 13:41:43 +0100 Subject: [PATCH] AP_Notify: RGB LED remove unused varables --- libraries/AP_Notify/RGBLed.cpp | 8 ++++---- libraries/AP_Notify/RGBLed.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libraries/AP_Notify/RGBLed.cpp b/libraries/AP_Notify/RGBLed.cpp index 203de11126..38aa64fb3a 100644 --- a/libraries/AP_Notify/RGBLed.cpp +++ b/libraries/AP_Notify/RGBLed.cpp @@ -220,11 +220,11 @@ void RGBLed::update() const uint8_t colour = (current_colour_sequence >> (step*3)) & 7; - _red_des = (colour & RED) ? brightness : _led_off; - _green_des = (colour & GREEN) ? brightness : _led_off; - _blue_des = (colour & BLUE) ? brightness : _led_off; + uint8_t red_des = (colour & RED) ? brightness : _led_off; + uint8_t green_des = (colour & GREEN) ? brightness : _led_off; + uint8_t blue_des = (colour & BLUE) ? brightness : _led_off; - set_rgb(_red_des, _green_des, _blue_des); + set_rgb(red_des, green_des, blue_des); } /* diff --git a/libraries/AP_Notify/RGBLed.h b/libraries/AP_Notify/RGBLed.h index 9786249f09..e525ad22d3 100644 --- a/libraries/AP_Notify/RGBLed.h +++ b/libraries/AP_Notify/RGBLed.h @@ -54,7 +54,6 @@ protected: void update_override(); // meta-data common to all hw devices - uint8_t _red_des, _green_des, _blue_des; // color requested by timed update uint8_t _red_curr, _green_curr, _blue_curr; // current colours displayed by the led uint8_t _led_off; uint8_t _led_bright;