AP_Notify: DiscoLED: keep includes sorted

This commit is contained in:
Lucas De Marchi 2017-01-19 08:59:00 -08:00
parent c27c414e5a
commit fd0e4164b9
2 changed files with 7 additions and 5 deletions

View File

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

View File

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