Skip to content

Commit

Permalink
Delete uneccessary #includes from the lights driver directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsauder authored and dagar committed Jul 9, 2019
1 parent f3af321 commit c1e4970
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 132 deletions.
32 changes: 7 additions & 25 deletions src/drivers/lights/blinkm/blinkm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,38 +93,20 @@
*
*/

#include <strings.h>

#include <px4_config.h>

#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <poll.h>

#include <px4_work_queue/ScheduledWorkItem.hpp>

#include <perf/perf_counter.h>
#include <systemlib/err.h>

#include <board_config.h>
#include <string.h>
#include <strings.h>

#include <drivers/device/i2c.h>
#include <drivers/drv_blinkm.h>

#include <uORB/uORB.h>
#include <uORB/topics/vehicle_status.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
#include <systemlib/err.h>
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/safety.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/vehicle_gps_position.h>
#include <uORB/topics/safety.h>
#include <uORB/topics/vehicle_status.h>

static const int LED_ONTIME = 120;
static const int LED_OFFTIME = 120;
Expand Down
28 changes: 5 additions & 23 deletions src/drivers/lights/oreoled/oreoled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,17 @@
*
*/

#include <px4_config.h>

#include <drivers/device/i2c.h>
#include <drivers/drv_hrt.h>

#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/stat.h>
#include <px4_getopt.h>

#include <nuttx/arch.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
#include <nuttx/clock.h>

#include <drivers/device/i2c.h>
#include <drivers/device/ringbuffer.h>
#include <drivers/drv_oreoled.h>
#include <perf/perf_counter.h>
#include <px4_getopt.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
#include <systemlib/err.h>

#include <board_config.h>

#include <drivers/drv_oreoled.h>
#include <drivers/device/ringbuffer.h>

#define OREOLED_NUM_LEDS 4 ///< maximum number of LEDs the oreo led driver can support
#define OREOLED_BASE_I2C_ADDR 0x68 ///< base i2c address (7-bit)
#define OPEOLED_I2C_RETRYCOUNT 2 ///< i2c retry count
Expand Down
19 changes: 2 additions & 17 deletions src/drivers/lights/pca8574/pca8574.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,14 @@
* @author Anton Babushkin <anton.babushkin@me.com>
*/

#include <px4_config.h>
#include <string.h>

#include <drivers/device/i2c.h>

#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <drivers/drv_io_expander.h>
#include <px4_getopt.h>

#include <px4_work_queue/ScheduledWorkItem.hpp>

#include <perf/perf_counter.h>
#include <systemlib/err.h>

#include <board_config.h>

#include <drivers/drv_io_expander.h>

#define PCA8574_ONTIME 120
#define PCA8574_OFFTIME 120
Expand Down
25 changes: 3 additions & 22 deletions src/drivers/lights/rgbled/rgbled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,12 @@
* @author Anton Babushkin <anton.babushkin@me.com>
*/

#include <px4_config.h>
#include <px4_getopt.h>

#include <drivers/device/i2c.h>

#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>

#include <px4_work_queue/ScheduledWorkItem.hpp>

#include <perf/perf_counter.h>
#include <systemlib/err.h>

#include <board_config.h>

#include <drivers/drv_led.h>
#include <drivers/device/i2c.h>
#include <lib/led/led.h>

#include <px4_getopt.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
#include "uORB/topics/parameter_update.h"

#define RGBLED_ONTIME 120
Expand Down
26 changes: 4 additions & 22 deletions src/drivers/lights/rgbled_ncp5623c/rgbled_ncp5623c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,15 @@
* @author CUAVcaijie <caijie@cuav.net>
*/

#include <px4_config.h>
#include <px4_getopt.h>

#include <drivers/device/i2c.h>

#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>

#include <px4_work_queue/ScheduledWorkItem.hpp>

#include <perf/perf_counter.h>
#include <systemlib/err.h>

#include <board_config.h>

#include <drivers/drv_led.h>
#include <drivers/device/i2c.h>
#include <lib/led/led.h>

#include <px4_getopt.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
#include "uORB/topics/parameter_update.h"


#define ADDR 0x39 /**< I2C adress of NCP5623C */

#define NCP5623_LED_CURRENT 0x20 /**< Current register */
Expand Down
26 changes: 3 additions & 23 deletions src/drivers/lights/rgbled_pwm/rgbled_pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,12 @@
*
*/

#include <nuttx/config.h>

//#include <drivers/device/i2c.h>

#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <px4_getopt.h>

#include <px4_work_queue/ScheduledWorkItem.hpp>
#include <drivers/drv_hrt.h>

#include <perf/perf_counter.h>
#include <systemlib/err.h>

#include <board_config.h>

#include <drivers/drv_led.h>
#include <lib/led/led.h>
#include <drivers/device/device.h>
#include <lib/led/led.h>
#include <px4_getopt.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
#include <systemlib/err.h>

#define RGBLED_ONTIME 120
Expand Down

0 comments on commit c1e4970

Please sign in to comment.