Browse Source

AP_Notify: DiscoLED: keep includes sorted

mission-4.1.18
Lucas De Marchi 8 years ago
parent
commit
fd0e4164b9
  1. 8
      libraries/AP_Notify/DiscoLED.cpp
  2. 4
      libraries/AP_Notify/DiscoLED.h

8
libraries/AP_Notify/DiscoLED.cpp

@ -14,13 +14,14 @@ @@ -14,13 +14,14 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#include <AP_HAL_Linux/PWM_Sysfs.h>
#include <AP_HAL_Linux/Led_Sysfs.h>
#include "DiscoLED.h"
#include <AP_HAL_Linux/Led_Sysfs.h>
#include <AP_HAL_Linux/PWM_Sysfs.h>
#define RED_PWM_INDEX 9
#define GREEN_PWM_INDEX 8
#define BLUE_PWM_INDEX 15
@ -74,7 +75,6 @@ bool DiscoLED::hw_init() @@ -74,7 +75,6 @@ bool DiscoLED::hw_init()
bool DiscoLED::hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue)
{
switch (backend) {
case PWM_SYSFS:
red_pwm.set_duty_cycle(red / UINT8_MAX * red_pwm_period);

4
libraries/AP_Notify/DiscoLED.h

@ -17,9 +17,11 @@ @@ -17,9 +17,11 @@
#pragma once
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#include <AP_HAL_Linux/PWM_Sysfs.h>
#include <AP_HAL_Linux/Led_Sysfs.h>
#include <AP_HAL_Linux/PWM_Sysfs.h>
#include "RGBLed.h"
class DiscoLED: public RGBLed

Loading…
Cancel
Save