diff --git a/libraries/AP_Notify/AP_Notify.cpp b/libraries/AP_Notify/AP_Notify.cpp index 0d48105907..e2b0bba2a4 100644 --- a/libraries/AP_Notify/AP_Notify.cpp +++ b/libraries/AP_Notify/AP_Notify.cpp @@ -29,7 +29,7 @@ #include "ToshibaLED_I2C.h" #include "ToshibaLED_PX4.h" #include "VRBoard_LED.h" -#include "Navio2LED.h" +#include "DiscreteRGBLed.h" // table of user settable parameters const AP_Param::GroupInfo AP_Notify::var_info[] = { @@ -80,7 +80,7 @@ struct AP_Notify::notify_events_type AP_Notify::events; ToshibaLED_I2C toshibaled; NotifyDevice *AP_Notify::_devices[] = {&navioled, &toshibaled}; #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2 - Navio2LED navioled; + DiscreteRGBLed navioled; ToshibaLED_I2C toshibaled; NotifyDevice *AP_Notify::_devices[] = {&navioled, &toshibaled}; #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BBBMINI diff --git a/libraries/AP_Notify/Navio2LED.cpp b/libraries/AP_Notify/DiscreteRGBLed.cpp similarity index 89% rename from libraries/AP_Notify/Navio2LED.cpp rename to libraries/AP_Notify/DiscreteRGBLed.cpp index 86491bea8c..8521d02c9d 100644 --- a/libraries/AP_Notify/Navio2LED.cpp +++ b/libraries/AP_Notify/DiscreteRGBLed.cpp @@ -1,5 +1,5 @@ /* - Navio2LED driver + DiscreteRGBLed driver */ /* This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ along with this program. If not, see . */ -#include "Navio2LED.h" +#include "DiscreteRGBLed.h" #define NAVIO_LED_BRIGHT 1 // full brightness #define NAVIO_LED_MEDIUM 1 // medium brightness @@ -27,14 +27,14 @@ extern const AP_HAL::HAL& hal; -Navio2LED::Navio2LED() +DiscreteRGBLed::DiscreteRGBLed() : RGBLed(NAVIO_LED_OFF, NAVIO_LED_BRIGHT, NAVIO_LED_MEDIUM, NAVIO_LED_DIM) { } #include -bool Navio2LED::hw_init(void) +bool DiscreteRGBLed::hw_init(void) { red_pin = hal.gpio->channel(RED_PIN); green_pin = hal.gpio->channel(GREEN_PIN); @@ -52,7 +52,7 @@ bool Navio2LED::hw_init(void) } // set_rgb - set color as a combination of red, green and blue values -bool Navio2LED::hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) +bool DiscreteRGBLed::hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) { /* We fix the GPIO polarity right here */ diff --git a/libraries/AP_Notify/Navio2LED.h b/libraries/AP_Notify/DiscreteRGBLed.h similarity index 94% rename from libraries/AP_Notify/Navio2LED.h rename to libraries/AP_Notify/DiscreteRGBLed.h index 506734da96..1036103a5a 100644 --- a/libraries/AP_Notify/Navio2LED.h +++ b/libraries/AP_Notify/DiscreteRGBLed.h @@ -20,9 +20,9 @@ #include "RGBLed.h" -class Navio2LED: public RGBLed { +class DiscreteRGBLed: public RGBLed { public: - Navio2LED(); + DiscreteRGBLed(); bool hw_init(void) override; bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;