Browse Source

AP_Notify: rgbled methods protected and add override

no functional change
master
Randy Mackay 8 years ago
parent
commit
0e20c8040c
  1. 7
      libraries/AP_Notify/DiscoLED.h
  2. 2
      libraries/AP_Notify/DiscreteRGBLed.h
  3. 4
      libraries/AP_Notify/NavioLED_I2C.h
  4. 6
      libraries/AP_Notify/RCOutputRGBLed.h
  5. 6
      libraries/AP_Notify/ToshibaLED_I2C.h
  6. 6
      libraries/AP_Notify/ToshibaLED_PX4.h
  7. 5
      libraries/AP_Notify/VRBoard_LED.h

7
libraries/AP_Notify/DiscoLED.h

@ -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;

2
libraries/AP_Notify/DiscreteRGBLed.h

@ -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;

4
libraries/AP_Notify/NavioLED_I2C.h

@ -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;

6
libraries/AP_Notify/RCOutputRGBLed.h

@ -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;

6
libraries/AP_Notify/ToshibaLED_I2C.h

@ -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;

6
libraries/AP_Notify/ToshibaLED_PX4.h

@ -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);

5
libraries/AP_Notify/VRBoard_LED.h

@ -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…
Cancel
Save