mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Tools: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files: - If the header is in the same directory the source belongs to, so the notation '#include ""' is used with the path relative to the directory containing the source. - If the header is outside the directory containing the source, then we use the notation '#include <>' with the path relative to libraries folder. Some of the advantages of such approach: - Only one search path for libraries headers. - OSs like Windows may have a better lookup time.
This commit is contained in:
parent
93c80b03ae
commit
84b5555a1a
@ -24,7 +24,7 @@
|
||||
#define JetiBox_h
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "Print.h"
|
||||
#include <AP_HAL/utility/Print.h>
|
||||
|
||||
#define jbox_key_up 0b0010
|
||||
#define jbox_key_right 0b0001
|
||||
|
@ -5,39 +5,39 @@
|
||||
Andrew Tridgell September 2011
|
||||
*/
|
||||
|
||||
#include <AP_HAL.h>
|
||||
#include <AP_HAL_AVR.h>
|
||||
#include <AP_HAL_SITL.h>
|
||||
#include <AP_HAL_PX4.h>
|
||||
#include <AP_HAL_Empty.h>
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Scheduler.h>
|
||||
#include <AP_Baro.h>
|
||||
#include <AP_ADC.h>
|
||||
#include <AP_GPS.h>
|
||||
#include <AP_InertialSensor.h>
|
||||
#include <AP_Notify.h>
|
||||
#include <DataFlash.h>
|
||||
#include <GCS_MAVLink.h>
|
||||
#include <AP_Compass.h>
|
||||
#include <AP_Declination.h>
|
||||
#include <SITL.h>
|
||||
#include <Filter.h>
|
||||
#include <AP_Param.h>
|
||||
#include <StorageManager.h>
|
||||
#include <AP_Progmem.h>
|
||||
#include <AP_Math.h>
|
||||
#include <AP_AHRS.h>
|
||||
#include <AP_NavEKF.h>
|
||||
#include <AP_Airspeed.h>
|
||||
#include <AP_Vehicle.h>
|
||||
#include <AP_Mission.h>
|
||||
#include <AP_Terrain.h>
|
||||
#include <AP_BattMonitor.h>
|
||||
#include <AP_Rally.h>
|
||||
#include <AP_ADC_AnalogSource.h>
|
||||
#include <AP_OpticalFlow.h>
|
||||
#include <AP_RangeFinder.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_HAL_AVR/AP_HAL_AVR.h>
|
||||
#include <AP_HAL_SITL/AP_HAL_SITL.h>
|
||||
#include <AP_HAL_PX4/AP_HAL_PX4.h>
|
||||
#include <AP_HAL_Empty/AP_HAL_Empty.h>
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Scheduler/AP_Scheduler.h>
|
||||
#include <AP_Baro/AP_Baro.h>
|
||||
#include <AP_ADC/AP_ADC.h>
|
||||
#include <AP_GPS/AP_GPS.h>
|
||||
#include <AP_InertialSensor/AP_InertialSensor.h>
|
||||
#include <AP_Notify/AP_Notify.h>
|
||||
#include <DataFlash/DataFlash.h>
|
||||
#include <GCS_MAVLink/GCS_MAVLink.h>
|
||||
#include <AP_Compass/AP_Compass.h>
|
||||
#include <AP_Declination/AP_Declination.h>
|
||||
#include <SITL/SITL.h>
|
||||
#include <Filter/Filter.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
#include <StorageManager/StorageManager.h>
|
||||
#include <AP_Progmem/AP_Progmem.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_AHRS/AP_AHRS.h>
|
||||
#include <AP_NavEKF/AP_NavEKF.h>
|
||||
#include <AP_Airspeed/AP_Airspeed.h>
|
||||
#include <AP_Vehicle/AP_Vehicle.h>
|
||||
#include <AP_Mission/AP_Mission.h>
|
||||
#include <AP_Terrain/AP_Terrain.h>
|
||||
#include <AP_BattMonitor/AP_BattMonitor.h>
|
||||
#include <AP_Rally/AP_Rally.h>
|
||||
#include <AP_ADC_AnalogSource/AP_ADC_AnalogSource.h>
|
||||
#include <AP_OpticalFlow/AP_OpticalFlow.h>
|
||||
#include <AP_RangeFinder/AP_RangeFinder.h>
|
||||
|
||||
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;
|
||||
|
||||
|
@ -9,8 +9,8 @@ version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
// Libraries
|
||||
#include <FastSerial.h>
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Math.h>
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <Arduino_Mega_ISR_Registry.h>
|
||||
#include <APM_RC.h> // ArduPilot Mega RC Library
|
||||
|
||||
|
@ -59,12 +59,12 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#pragma pack(1)
|
||||
#include "mavlink_types.h"
|
||||
#include <GCS_MAVLink/include/mavlink/v1.0/mavlink_types.h>
|
||||
|
||||
mavlink_system_t mavlink_system;
|
||||
void comm_send_ch(mavlink_channel_t chan, uint8_t ch);
|
||||
#define MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
#include "ardupilotmega/mavlink.h"
|
||||
#include <GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink.h>
|
||||
|
||||
#define TARGET_SYSTEM 7 /* XXX what should these really be? */
|
||||
#define TARGET_COMPONENT 1
|
||||
|
@ -5,30 +5,30 @@
|
||||
Andrew Tridgell September 2011
|
||||
*/
|
||||
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Progmem.h>
|
||||
#include <AP_HAL.h>
|
||||
#include <AP_HAL_AVR.h>
|
||||
#include <AP_HAL_SITL.h>
|
||||
#include <AP_HAL_PX4.h>
|
||||
#include <AP_HAL_Empty.h>
|
||||
#include <AP_Math.h>
|
||||
#include <Filter.h>
|
||||
#include <AP_InertialSensor.h>
|
||||
#include <AP_ADC.h>
|
||||
#include <GCS_MAVLink.h>
|
||||
#include <AP_Param.h>
|
||||
#include <AP_Baro.h>
|
||||
#include <AP_Compass.h>
|
||||
#include <AP_Declination.h>
|
||||
#include <SITL.h>
|
||||
#include <DataFlash.h>
|
||||
#include <AP_GPS.h>
|
||||
#include <AP_AHRS.h>
|
||||
#include <AP_Airspeed.h>
|
||||
#include <AP_Vehicle.h>
|
||||
#include <AP_ADC_AnalogSource.h>
|
||||
#include <AP_Notify.h>
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Progmem/AP_Progmem.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_HAL_AVR/AP_HAL_AVR.h>
|
||||
#include <AP_HAL_SITL/AP_HAL_SITL.h>
|
||||
#include <AP_HAL_PX4/AP_HAL_PX4.h>
|
||||
#include <AP_HAL_Empty/AP_HAL_Empty.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <Filter/Filter.h>
|
||||
#include <AP_InertialSensor/AP_InertialSensor.h>
|
||||
#include <AP_ADC/AP_ADC.h>
|
||||
#include <GCS_MAVLink/GCS_MAVLink.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
#include <AP_Baro/AP_Baro.h>
|
||||
#include <AP_Compass/AP_Compass.h>
|
||||
#include <AP_Declination/AP_Declination.h>
|
||||
#include <SITL/SITL.h>
|
||||
#include <DataFlash/DataFlash.h>
|
||||
#include <AP_GPS/AP_GPS.h>
|
||||
#include <AP_AHRS/AP_AHRS.h>
|
||||
#include <AP_Airspeed/AP_Airspeed.h>
|
||||
#include <AP_Vehicle/AP_Vehicle.h>
|
||||
#include <AP_ADC_AnalogSource/AP_ADC_AnalogSource.h>
|
||||
#include <AP_Notify/AP_Notify.h>
|
||||
|
||||
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef REPLAY_DATAFLASHREADER_H
|
||||
#define REPLAY_DATAFLASHREADER_H
|
||||
|
||||
#include <DataFlash.h>
|
||||
#include <DataFlash/DataFlash.h>
|
||||
|
||||
class DataFlashFileReader
|
||||
{
|
||||
|
@ -296,7 +296,7 @@ void LR_MsgHandler_MAG::process_message(uint8_t *msg)
|
||||
update_from_msg_compass(0, msg);
|
||||
}
|
||||
|
||||
#include <AP_AHRS.h>
|
||||
#include <AP_AHRS/AP_AHRS.h>
|
||||
#include "VehicleType.h"
|
||||
|
||||
void LR_MsgHandler_MSG::process_message(uint8_t *msg)
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include <AP_HAL.h>
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Math.h>
|
||||
#include <AP_Airspeed.h>
|
||||
#include <AP_Compass.h>
|
||||
#include <AP_GPS.h>
|
||||
#include <AP_Compass.h>
|
||||
#include <AP_Baro.h>
|
||||
#include <AP_InertialSensor.h>
|
||||
#include <DataFlash.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_Airspeed/AP_Airspeed.h>
|
||||
#include <AP_Compass/AP_Compass.h>
|
||||
#include <AP_GPS/AP_GPS.h>
|
||||
#include <AP_Compass/AP_Compass.h>
|
||||
#include <AP_Baro/AP_Baro.h>
|
||||
#include <AP_InertialSensor/AP_InertialSensor.h>
|
||||
#include <DataFlash/DataFlash.h>
|
||||
|
||||
#include "LogReader.h"
|
||||
#include <stdio.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef AP_MSGHANDLER_H
|
||||
#define AP_MSGHANDLER_H
|
||||
|
||||
#include <DataFlash.h>
|
||||
#include <DataFlash/DataFlash.h>
|
||||
#include "VehicleType.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef PARAMETERS_H
|
||||
#define PARAMETERS_H
|
||||
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Common/AP_Common.h>
|
||||
|
||||
// Global parameter class.
|
||||
//
|
||||
|
@ -14,48 +14,48 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Progmem.h>
|
||||
#include <AP_Param.h>
|
||||
#include <StorageManager.h>
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Progmem/AP_Progmem.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
#include <StorageManager/StorageManager.h>
|
||||
#include <fenv.h>
|
||||
#include <AP_Math.h>
|
||||
#include <AP_HAL.h>
|
||||
#include <AP_HAL_AVR.h>
|
||||
#include <AP_HAL_SITL.h>
|
||||
#include <AP_HAL_Linux.h>
|
||||
#include <AP_HAL_Empty.h>
|
||||
#include <AP_ADC.h>
|
||||
#include <AP_Declination.h>
|
||||
#include <AP_ADC_AnalogSource.h>
|
||||
#include <Filter.h>
|
||||
#include <AP_Buffer.h>
|
||||
#include <AP_Airspeed.h>
|
||||
#include <AP_Vehicle.h>
|
||||
#include <AP_Notify.h>
|
||||
#include <DataFlash.h>
|
||||
#include <GCS_MAVLink.h>
|
||||
#include <AP_GPS.h>
|
||||
#include <AP_AHRS.h>
|
||||
#include <SITL.h>
|
||||
#include <AP_Compass.h>
|
||||
#include <AP_Baro.h>
|
||||
#include <AP_InertialSensor.h>
|
||||
#include <AP_InertialNav.h>
|
||||
#include <AP_NavEKF.h>
|
||||
#include <AP_Mission.h>
|
||||
#include <AP_Rally.h>
|
||||
#include <AP_BattMonitor.h>
|
||||
#include <AP_Terrain.h>
|
||||
#include <AP_OpticalFlow.h>
|
||||
#include <AP_SerialManager.h>
|
||||
#include <RC_Channel.h>
|
||||
#include <AP_RangeFinder.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_HAL_AVR/AP_HAL_AVR.h>
|
||||
#include <AP_HAL_SITL/AP_HAL_SITL.h>
|
||||
#include <AP_HAL_Linux/AP_HAL_Linux.h>
|
||||
#include <AP_HAL_Empty/AP_HAL_Empty.h>
|
||||
#include <AP_ADC/AP_ADC.h>
|
||||
#include <AP_Declination/AP_Declination.h>
|
||||
#include <AP_ADC_AnalogSource/AP_ADC_AnalogSource.h>
|
||||
#include <Filter/Filter.h>
|
||||
#include <AP_Buffer/AP_Buffer.h>
|
||||
#include <AP_Airspeed/AP_Airspeed.h>
|
||||
#include <AP_Vehicle/AP_Vehicle.h>
|
||||
#include <AP_Notify/AP_Notify.h>
|
||||
#include <DataFlash/DataFlash.h>
|
||||
#include <GCS_MAVLink/GCS_MAVLink.h>
|
||||
#include <AP_GPS/AP_GPS.h>
|
||||
#include <AP_AHRS/AP_AHRS.h>
|
||||
#include <SITL/SITL.h>
|
||||
#include <AP_Compass/AP_Compass.h>
|
||||
#include <AP_Baro/AP_Baro.h>
|
||||
#include <AP_InertialSensor/AP_InertialSensor.h>
|
||||
#include <AP_InertialNav/AP_InertialNav.h>
|
||||
#include <AP_NavEKF/AP_NavEKF.h>
|
||||
#include <AP_Mission/AP_Mission.h>
|
||||
#include <AP_Rally/AP_Rally.h>
|
||||
#include <AP_BattMonitor/AP_BattMonitor.h>
|
||||
#include <AP_Terrain/AP_Terrain.h>
|
||||
#include <AP_OpticalFlow/AP_OpticalFlow.h>
|
||||
#include <AP_SerialManager/AP_SerialManager.h>
|
||||
#include <RC_Channel/RC_Channel.h>
|
||||
#include <AP_RangeFinder/AP_RangeFinder.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <utility/getopt_cpp.h>
|
||||
#include <AP_HAL/utility/getopt_cpp.h>
|
||||
#include "Parameters.h"
|
||||
#include "VehicleType.h"
|
||||
#include "MsgHandler.h"
|
||||
|
Loading…
Reference in New Issue
Block a user