mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 00:43:34 +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:
@@ -39,7 +39,7 @@
|
||||
#include <lib/cdev/CDev.hpp>
|
||||
#include <lib/conversion/rotation.h>
|
||||
#include <mathlib/math/filter/LowPassFilter2pVector3f.hpp>
|
||||
#include <px4_module_params.h>
|
||||
#include <px4_platform_common/module_params.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/PublicationMulti.hpp>
|
||||
#include <uORB/topics/sensor_accel.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <drivers/device/device.h>
|
||||
|
||||
#include <drivers/device/i2c.h>
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#include <drivers/device/i2c.h>
|
||||
#include <drivers/drv_airspeed.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "px4_posix.h"
|
||||
#include "drivers/drv_device.h"
|
||||
#include <px4_platform_common/posix.h>
|
||||
#include <drivers/drv_device.h>
|
||||
|
||||
namespace device
|
||||
{
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
#include "Device.hpp"
|
||||
#include <lib/cdev/CDev.hpp>
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/posix.h>
|
||||
|
||||
/**
|
||||
* Namespace encapsulating all device framework classes, functions and data.
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
/*
|
||||
* Includes here should only cover the needs of the framework definitions.
|
||||
*/
|
||||
#include <px4_config.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/posix.h>
|
||||
|
||||
#include <drivers/drv_device.h>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "../CDev.hpp"
|
||||
|
||||
#include <px4_i2c.h>
|
||||
#include <px4_platform_common/i2c.h>
|
||||
|
||||
#if !defined(CONFIG_I2C)
|
||||
# error I2C support requires CONFIG_I2C
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#include "SPI.hpp"
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#ifndef CONFIG_SPI_EXCHANGE
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "../CDev.hpp"
|
||||
|
||||
#include <px4_i2c.h>
|
||||
#include <px4_platform_common/i2c.h>
|
||||
|
||||
#ifdef __PX4_LINUX
|
||||
#include <linux/i2c.h>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
namespace device
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <lib/cdev/CDev.hpp>
|
||||
#include <lib/conversion/rotation.h>
|
||||
#include <mathlib/math/filter/LowPassFilter2pVector3f.hpp>
|
||||
#include <px4_module_params.h>
|
||||
#include <px4_platform_common/module_params.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/PublicationMulti.hpp>
|
||||
#include <uORB/topics/sensor_gyro.h>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* LED driver to control the onboard LED(s) via ioctl interface.
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <lib/cdev/CDev.hpp>
|
||||
#include <drivers/drv_board_led.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <px4_posix.h>
|
||||
#include <px4_platform_common/posix.h>
|
||||
|
||||
#define PIN_INDEX_BUFFER_MAX (16)
|
||||
#define PIN_DIRECTION_BUFFER_MAX (30 + PIN_INDEX_BUFFER_MAX)
|
||||
|
||||
Reference in New Issue
Block a user