Remove include <log.h> from defines.h

The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
This commit is contained in:
Ville Juven 2022-09-23 13:58:44 +03:00 committed by Beat Küng
parent 1f7080a710
commit 59e86c490d
50 changed files with 66 additions and 2 deletions

View File

@ -39,7 +39,7 @@
#pragma once
#include <px4_platform_common/log.h>
#include <sys/ioctl.h>
/****************************************************************************
* Defines for all platforms.

View File

@ -40,6 +40,7 @@
#include <containers/List.hpp>
#include <lib/conversion/rotation.h>
#include <px4_platform_common/atomic.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <px4_platform_common/sem.h>

View File

@ -31,6 +31,7 @@
*
****************************************************************************/
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
namespace px4

View File

@ -36,6 +36,7 @@
#include <string.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/time.h>
#include <drivers/drv_hrt.h>

View File

@ -36,6 +36,7 @@
#include <px4_platform_common/px4_work_queue/WorkQueue.hpp>
#include <drivers/drv_hrt.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/posix.h>
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/time.h>

View File

@ -39,6 +39,7 @@
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/posix.h>
#include <px4_platform_common/time.h>
#include <px4_platform_common/tasks.h>

View File

@ -43,6 +43,7 @@
#include <stdio.h>
#include <px4_platform/cpuload.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/printload.h>
#include <drivers/drv_hrt.h>

View File

@ -32,6 +32,7 @@
****************************************************************************/
#include <px4_platform_common/init.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/px4_manifest.h>
#include <px4_platform_common/console_buffer.h>

View File

@ -37,6 +37,8 @@
* PX4 Middleware Wrapper NuttX Implementation
*/
#include <cstdio>
#include <px4_platform_common/defines.h>
#include <drivers/drv_hrt.h>

View File

@ -33,6 +33,7 @@
#if defined(PX4_CRYPTO)
#include <px4_platform/board_ctrl.h>
#include <px4_platform_common/crypto.h>
#include <px4_platform_common/crypto_backend.h>
#include <sys/boardctl.h>

View File

@ -33,6 +33,8 @@
#include <nuttx/config.h>
#include <stdbool.h>
#include <px4_platform/board_ctrl.h>
#include <sys/boardctl.h>

View File

@ -38,6 +38,7 @@
*/
#include <systemlib/px4_macros.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform/board_determine_hw_info.h>

View File

@ -46,6 +46,7 @@
#include <stdio.h>
#include <stdbool.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/printload.h>
#include <drivers/drv_hrt.h>

View File

@ -34,6 +34,7 @@
#include <px4_platform_common/init.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <drivers/drv_hrt.h>
#include <lib/parameters/param.h>
#include <px4_platform_common/px4_work_queue/WorkQueueManager.hpp>

View File

@ -38,6 +38,7 @@
*/
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/workqueue.h>
#include <px4_platform_common/time.h>
#include <stdint.h>

View File

@ -42,6 +42,7 @@
#pragma once
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <lib/parameters/param.h>
#include <containers/List.hpp>

View File

@ -42,6 +42,7 @@
#pragma once
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <lib/parameters/param.h>

View File

@ -48,6 +48,7 @@
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
/*******************************************************************************
* Definitions

View File

@ -41,6 +41,7 @@
#include <drivers/drv_hrt.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <uORB/topics/satellite_info.h>
#include <uORB/topics/sensor_gps.h>
#include <uORB/topics/sensor_gnss_relative.h>

View File

@ -35,6 +35,7 @@
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/time.h>
#include <drivers/device/i2c.h>
#include <px4_platform_common/i2c_spi_buses.h>

View File

@ -38,6 +38,7 @@
*/
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <drivers/device/i2c.h>
#include "hmc5883.h"

View File

@ -38,6 +38,7 @@
*/
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <drivers/device/spi.h>
#include "hmc5883.h"

View File

@ -44,6 +44,7 @@
#include <systemlib/px4_macros.h> // arraySize
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#ifndef B250000
#define B250000 250000

View File

@ -35,6 +35,7 @@
#include <lib/geo/geo.h>
#include <px4_defines.h>
#include <px4_platform_common/log.h>
const char *const UavcanBatteryBridge::NAME = "battery";

View File

@ -39,6 +39,7 @@
*/
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/posix.h>
#include <unistd.h>

View File

@ -41,6 +41,7 @@
#include <cstring>
#include <px4_platform_common/log.h>
#include <px4_platform_common/posix.h>
namespace cdev

View File

@ -41,6 +41,7 @@
#include "cdevtest_example.h"
#include <px4_platform_common/log.h>
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/time.h>
#include <lib/cdev/CDev.hpp>

View File

@ -40,8 +40,11 @@
#include "Block.hpp"
#include "BlockParam.hpp"
#include <cstdio>
#include <cstring>
#include <px4_platform_common/log.h>
namespace control
{

View File

@ -39,10 +39,13 @@
#include "BlockParam.hpp"
#include <cstdio>
#include <cstring>
#include <containers/List.hpp>
#include <px4_platform_common/log.h>
namespace control
{

View File

@ -41,6 +41,7 @@
#include <cstring>
#include <px4_platform_common/log.h>
#include <px4_platform_common/posix.h>
namespace device

View File

@ -40,9 +40,12 @@
#ifndef _DEVICE_DEVICE_HPP
#define _DEVICE_DEVICE_HPP
#include <cstdio>
/*
* Includes here should only cover the needs of the framework definitions.
*/
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/posix.h>

View File

@ -37,6 +37,7 @@
* LED driver to control the onboard LED(s) via ioctl interface.
*/
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_config.h>
#include <lib/cdev/CDev.hpp>
#include <drivers/drv_board_led.h>

View File

@ -48,6 +48,8 @@
#include <stdbool.h>
#include <stdint.h>
#include <drivers/drv_hrt.h>
#include <lib/mathlib/mathlib.h>
#include <lib/matrix/matrix/math.hpp>

View File

@ -43,6 +43,7 @@
*/
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/posix.h>
#include <px4_platform_common/shutdown.h>

View File

@ -31,6 +31,8 @@
*
****************************************************************************/
#include <string.h>
/**
* @file parameters_common.cpp
*

View File

@ -38,6 +38,9 @@
*/
#define PARAM_IMPLEMENTATION
#include <errno.h>
#include "param.h"
#include "parameters_ioctl.h"
#include <px4_platform_common/defines.h>

View File

@ -42,6 +42,7 @@
#define PARAM_IMPLEMENTATION
#include "param.h"
#include <px4_platform/board_ctrl.h>
#include <px4_platform_common/defines.h>
#define _PARAMIOC(_n) (_PX4_IOC(_PARAMIOCBASE, _n))

View File

@ -42,6 +42,7 @@
#include <parameters/px4_parameters.hpp>
#include <sys/boardctl.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include "parameters_common.cpp"

View File

@ -42,6 +42,7 @@
#include <px4_platform_common/px4_config.h>
#include <board_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <fcntl.h>
#include <math.h>

View File

@ -38,6 +38,8 @@
#pragma once
#include <drivers/drv_hrt.h>
#include <mathlib/mathlib.h>
#include <matrix/math.hpp>

View File

@ -33,6 +33,8 @@
#pragma once
#include <stdint.h>
#include <matrix/matrix/math.hpp>
#include <px4_platform_common/defines.h>

View File

@ -43,6 +43,7 @@
#define EKF_ESTIMATOR_INTERFACE_H
#if defined(MODULE_NAME)
#include <px4_platform_common/log.h>
# define ECL_INFO PX4_DEBUG
# define ECL_WARN PX4_DEBUG
# define ECL_ERR PX4_DEBUG

View File

@ -40,7 +40,7 @@
#include <matrix/matrix/math.hpp>
#include <px4_platform_common/posix.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
namespace gimbal
{

View File

@ -34,6 +34,7 @@
#include "input_test.h"
#include <px4_platform_common/posix.h>
#include <px4_platform_common/log.h>
#include <lib/matrix/matrix/math.hpp>
#include <lib/mathlib/mathlib.h>

View File

@ -41,6 +41,7 @@
#include <mathlib/mathlib.h>
#include <px4_platform_common/posix.h>
#include <px4_platform_common/crypto.h>
#include <px4_platform_common/log.h>
#ifdef __PX4_NUTTX
#include <systemlib/hardfault_log.h>
#endif /* __PX4_NUTTX */

View File

@ -40,6 +40,8 @@
#include "mavlink_shell.h"
#include <px4_platform_common/defines.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/posix.h>
#include <unistd.h>
#include <errno.h>

View File

@ -36,6 +36,7 @@
* Tests for the data manager.
*/
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/posix.h>

View File

@ -37,6 +37,7 @@
*/
#include <drivers/drv_hrt.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/posix.h>
#include <sys/time.h>

View File

@ -36,6 +36,7 @@
* Tests related to the performance counter.
*/
#include <px4_platform_common/log.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/posix.h>

View File

@ -36,6 +36,8 @@
* Tests the px4_usleep() method.
*/
#include <drivers/drv_hrt.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/time.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>