mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 01:23: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:
@@ -38,7 +38,7 @@
|
||||
* @author Lorenz Meier <lorenz@px4.io>
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include "mavlink_command_sender.h"
|
||||
#include <px4_log.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
|
||||
#define CMD_DEBUG(FMT, ...) PX4_LOG_NAMED_COND("cmd sender", _debug_enabled, FMT, ##__VA_ARGS__)
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <px4_tasks.h>
|
||||
#include <px4_sem.h>
|
||||
#include <px4_platform_common/tasks.h>
|
||||
#include <px4_platform_common/sem.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <dirent.h>
|
||||
#include <queue.h>
|
||||
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
|
||||
@@ -62,13 +62,13 @@
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <px4_cli.h>
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <px4_module.h>
|
||||
#include <px4_module_params.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_platform_common/cli.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <px4_platform_common/getopt.h>
|
||||
#include <px4_platform_common/module.h>
|
||||
#include <px4_platform_common/module_params.h>
|
||||
#include <px4_platform_common/posix.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <systemlib/uthash/utlist.h>
|
||||
#include <uORB/PublicationQueued.hpp>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <lib/ecl/geo/geo.h>
|
||||
#include <lib/mathlib/mathlib.h>
|
||||
#include <lib/matrix/matrix/math.hpp>
|
||||
#include <px4_time.h>
|
||||
#include <px4_platform_common/time.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <lib/ecl/geo/geo.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
#include <matrix/math.hpp>
|
||||
#include <navigator/navigation.h>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include "mavlink_parameters.h"
|
||||
#include "mavlink_timesync.h"
|
||||
|
||||
#include <px4_module_params.h>
|
||||
#include <px4_platform_common/module_params.h>
|
||||
#include <uORB/Publication.hpp>
|
||||
#include <uORB/PublicationQueued.hpp>
|
||||
#include <uORB/PublicationMulti.hpp>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include "mavlink_shell.h"
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <px4_tasks.h>
|
||||
#include <px4_platform_common/tasks.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <px4_log.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
|
||||
SimpleAnalyzer::SimpleAnalyzer(Mode mode, float window) :
|
||||
_window(window),
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define MAVLINK_STREAM_H_
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <px4_module_params.h>
|
||||
#include <px4_platform_common/module_params.h>
|
||||
#include <containers/List.hpp>
|
||||
|
||||
class Mavlink;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include "mavlink_ulog.h"
|
||||
#include <px4_log.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <errno.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <px4_tasks.h>
|
||||
#include <px4_sem.h>
|
||||
#include <px4_platform_common/tasks.h>
|
||||
#include <px4_platform_common/sem.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <uORB/Publication.hpp>
|
||||
|
||||
Reference in New Issue
Block a user