mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 03:53:33 +08:00
src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.
command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done
Transitional headers for submodules are added (px4_{defines,log,time}.h)
This commit is contained in:
@@ -40,13 +40,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_log.h>
|
||||
#include <px4_time.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <px4_platform_common/time.h>
|
||||
#include <lib/perf/perf_counter.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <lib/conversion/rotation.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
|
||||
#include "ak09916.hpp"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <lib/perf/perf_counter.h>
|
||||
#include <systemlib/conversions.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include "bmm150.hpp"
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
|
||||
/** driver 'main' command */
|
||||
extern "C" { __EXPORT int bmm150_main(int argc, char *argv[]); }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef BMM150_HPP_
|
||||
#define BMM150_HPP_
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <px4_log.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
* Driver for the HMC5883 / HMC5983 magnetometer connected via I2C or SPI.
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_time.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <px4_platform_common/time.h>
|
||||
|
||||
#include <drivers/device/i2c.h>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
#include <float.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
#include <lib/conversion/rotation.h>
|
||||
|
||||
#include "hmc5883.h"
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
/* XXX trim includes */
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
/* XXX trim includes */
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
* @author Maelok Dong
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
* Based on the hmc5883 driver.
|
||||
*/
|
||||
|
||||
#include <px4_time.h>
|
||||
#include <px4_platform_common/time.h>
|
||||
#include "lis3mdl.h"
|
||||
|
||||
LIS3MDL::LIS3MDL(device::Device *interface, const char *path, enum Rotation rotation) :
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
|
||||
|
||||
#include <perf/perf_counter.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
|
||||
/**
|
||||
* LIS3MDL internal constants and data structures.
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* I2C interface for LIS3MDL
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include "lis3mdl_main.h"
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
|
||||
/**
|
||||
* Driver 'main' command.
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* SPI interface for LIS3MDL
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
#include "LSM303AGR.hpp"
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <ecl/geo/geo.h>
|
||||
|
||||
/* SPI protocol address bits */
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
|
||||
#include "LSM303AGR.hpp"
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
|
||||
#define LSM303AGR_DEVICE_PATH_MAG "/dev/lsm303agr_mag"
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
* Driver for the QMC5883 magnetometer connected via I2C or SPI.
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
|
||||
#include <drivers/device/i2c.h>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
/* XXX trim includes */
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
/* XXX trim includes */
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <lib/conversion/rotation.h>
|
||||
|
||||
#include <perf/perf_counter.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* I2C interface for RM3100
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include "rm3100_main.h"
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
|
||||
/**
|
||||
* Driver 'main' command.
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* SPI interface for RM3100
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
Reference in New Issue
Block a user