mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 07:31:36 +08:00
Organize, alphabetize, and deprecate unneeded #includes from the barometer drivers.
This commit is contained in:
@@ -36,40 +36,8 @@
|
||||
* Driver for the BMP280 barometric pressure sensor connected via I2C TODO or SPI.
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <semaphore.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_log.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/clock.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
#include <board_config.h>
|
||||
#include "bmp280.h"
|
||||
|
||||
#include <lib/cdev/CDev.hpp>
|
||||
#include <drivers/drv_baro.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <px4_work_queue/ScheduledWorkItem.hpp>
|
||||
|
||||
|
||||
enum BMP280_BUS {
|
||||
BMP280_BUS_ALL = 0,
|
||||
BMP280_BUS_I2C_INTERNAL,
|
||||
|
||||
@@ -38,6 +38,23 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <drivers/drv_baro.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/device/i2c.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
#include <drivers/device/spi.h>
|
||||
#include <lib/cdev/CDev.hpp>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <px4_config.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_work_queue/ScheduledWorkItem.hpp>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
|
||||
#define BMP280_ADDR_CAL 0x88 /* address of 12x 2 bytes calibration data */
|
||||
#define BMP280_ADDR_DATA 0xF7 /* address of 2x 3 bytes p-t data */
|
||||
|
||||
|
||||
@@ -37,12 +37,8 @@
|
||||
* SPI interface for BMP280
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
|
||||
#include "bmp280.h"
|
||||
#include <drivers/device/i2c.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
#if defined(PX4_I2C_OBDEV_BMP280) || defined(PX4_I2C_EXT_OBDEV_BMP280)
|
||||
|
||||
|
||||
@@ -37,12 +37,8 @@
|
||||
* SPI interface for BMP280
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
|
||||
#include "bmp280.h"
|
||||
#include <drivers/device/spi.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
/* SPI protocol address bits */
|
||||
#define DIR_READ (1<<7) //for set
|
||||
|
||||
Reference in New Issue
Block a user