mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 07:13:56 -04:00
AP_Notify: rgbled methods protected and add override
no functional change
This commit is contained in:
parent
4aaeb4bfed
commit
0e20c8040c
@ -28,8 +28,11 @@ class DiscoLED: public RGBLed
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DiscoLED();
|
DiscoLED();
|
||||||
bool hw_init(void);
|
|
||||||
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b);
|
protected:
|
||||||
|
bool hw_init(void) override;
|
||||||
|
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Linux::PWM_Sysfs_Bebop red_pwm;
|
Linux::PWM_Sysfs_Bebop red_pwm;
|
||||||
Linux::PWM_Sysfs_Bebop green_pwm;
|
Linux::PWM_Sysfs_Bebop green_pwm;
|
||||||
|
@ -24,8 +24,10 @@ class DiscreteRGBLed: public RGBLed {
|
|||||||
public:
|
public:
|
||||||
DiscreteRGBLed(uint16_t red, uint16_t green, uint16_t blue, bool polarity);
|
DiscreteRGBLed(uint16_t red, uint16_t green, uint16_t blue, bool polarity);
|
||||||
|
|
||||||
|
protected:
|
||||||
bool hw_init(void) override;
|
bool hw_init(void) override;
|
||||||
bool hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) override;
|
bool hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AP_HAL::DigitalSource *red_pin;
|
AP_HAL::DigitalSource *red_pin;
|
||||||
AP_HAL::DigitalSource *green_pin;
|
AP_HAL::DigitalSource *green_pin;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
class NavioLED_I2C : public NavioLED
|
class NavioLED_I2C : public NavioLED
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual bool hw_init(void);
|
bool hw_init(void) override;
|
||||||
virtual bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b);
|
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AP_HAL::OwnPtr<AP_HAL::I2CDevice> _dev;
|
AP_HAL::OwnPtr<AP_HAL::I2CDevice> _dev;
|
||||||
|
@ -9,8 +9,10 @@ public:
|
|||||||
uint8_t led_medium, uint8_t led_dim);
|
uint8_t led_medium, uint8_t led_dim);
|
||||||
RCOutputRGBLed(uint8_t red_channel, uint8_t green_channel,
|
RCOutputRGBLed(uint8_t red_channel, uint8_t green_channel,
|
||||||
uint8_t blue_channel);
|
uint8_t blue_channel);
|
||||||
bool hw_init();
|
|
||||||
virtual bool hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue);
|
protected:
|
||||||
|
bool hw_init() override;
|
||||||
|
virtual bool hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t _red_channel;
|
uint8_t _red_channel;
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
|
|
||||||
class ToshibaLED_I2C : public ToshibaLED
|
class ToshibaLED_I2C : public ToshibaLED
|
||||||
{
|
{
|
||||||
public:
|
protected:
|
||||||
bool hw_init(void);
|
bool hw_init(void) override;
|
||||||
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b);
|
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AP_HAL::OwnPtr<AP_HAL::I2CDevice> _dev;
|
AP_HAL::OwnPtr<AP_HAL::I2CDevice> _dev;
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
class ToshibaLED_PX4 : public ToshibaLED
|
class ToshibaLED_PX4 : public ToshibaLED
|
||||||
{
|
{
|
||||||
public:
|
protected:
|
||||||
bool hw_init(void);
|
bool hw_init(void) override;
|
||||||
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b);
|
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
|
||||||
private:
|
private:
|
||||||
int _rgbled_fd;
|
int _rgbled_fd;
|
||||||
void update_timer(void);
|
void update_timer(void);
|
||||||
|
@ -27,6 +27,7 @@ class VRBoard_LED: public RGBLed {
|
|||||||
public:
|
public:
|
||||||
VRBoard_LED();
|
VRBoard_LED();
|
||||||
|
|
||||||
bool hw_init(void);
|
protected:
|
||||||
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b);
|
bool hw_init(void) override;
|
||||||
|
bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user