Browse Source

AP_HAL_Empty: 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.
mission-4.1.18
Gustavo Jose de Sousa 10 years ago committed by Andrew Tridgell
parent
commit
ca5afbfdc9
  1. 2
      libraries/AP_HAL_Empty/AP_HAL_Empty.h
  2. 2
      libraries/AP_HAL_Empty/AnalogIn.h
  3. 2
      libraries/AP_HAL_Empty/GPIO.h
  4. 2
      libraries/AP_HAL_Empty/HAL_Empty_Class.cpp
  5. 2
      libraries/AP_HAL_Empty/HAL_Empty_Class.h
  6. 2
      libraries/AP_HAL_Empty/I2CDriver.cpp
  7. 2
      libraries/AP_HAL_Empty/I2CDriver.h
  8. 2
      libraries/AP_HAL_Empty/RCInput.h
  9. 2
      libraries/AP_HAL_Empty/RCOutput.h
  10. 2
      libraries/AP_HAL_Empty/SPIDriver.h
  11. 2
      libraries/AP_HAL_Empty/Scheduler.h
  12. 2
      libraries/AP_HAL_Empty/Semaphores.h
  13. 2
      libraries/AP_HAL_Empty/Storage.h
  14. 2
      libraries/AP_HAL_Empty/UARTDriver.h
  15. 2
      libraries/AP_HAL_Empty/Util.h
  16. 18
      libraries/AP_HAL_Empty/examples/empty_example/empty_example.cpp

2
libraries/AP_HAL_Empty/AP_HAL_Empty.h

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
#define __AP_HAL_EMPTY_H__
/* Your layer exports should depend on AP_HAL.h ONLY. */
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
/**
* Umbrella header for AP_HAL_Empty module.

2
libraries/AP_HAL_Empty/AnalogIn.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_ANALOGIN_H__
#define __AP_HAL_EMPTY_ANALOGIN_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyAnalogSource : public AP_HAL::AnalogSource {
public:

2
libraries/AP_HAL_Empty/GPIO.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_GPIO_H__
#define __AP_HAL_EMPTY_GPIO_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyGPIO : public AP_HAL::GPIO {
public:

2
libraries/AP_HAL_Empty/HAL_Empty_Class.cpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_EMPTY
#include "HAL_Empty_Class.h"

2
libraries/AP_HAL_Empty/HAL_Empty_Class.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_CLASS_H__
#define __AP_HAL_EMPTY_CLASS_H__
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#include "AP_HAL_Empty_Namespace.h"
#include "PrivateMember.h"

2
libraries/AP_HAL_Empty/I2CDriver.cpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#include "I2CDriver.h"
using namespace Empty;

2
libraries/AP_HAL_Empty/I2CDriver.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_I2CDRIVER_H__
#define __AP_HAL_EMPTY_I2CDRIVER_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyI2CDriver : public AP_HAL::I2CDriver {
public:

2
libraries/AP_HAL_Empty/RCInput.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_RCINPUT_H__
#define __AP_HAL_EMPTY_RCINPUT_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyRCInput : public AP_HAL::RCInput {
public:

2
libraries/AP_HAL_Empty/RCOutput.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_RCOUTPUT_H__
#define __AP_HAL_EMPTY_RCOUTPUT_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyRCOutput : public AP_HAL::RCOutput {
void init(void* machtnichts);

2
libraries/AP_HAL_Empty/SPIDriver.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_SPIDRIVER_H__
#define __AP_HAL_EMPTY_SPIDRIVER_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
#include "Semaphores.h"
class Empty::EmptySPIDeviceDriver : public AP_HAL::SPIDeviceDriver {

2
libraries/AP_HAL_Empty/Scheduler.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_SCHEDULER_H__
#define __AP_HAL_EMPTY_SCHEDULER_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyScheduler : public AP_HAL::Scheduler {
public:

2
libraries/AP_HAL_Empty/Semaphores.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_SEMAPHORE_H__
#define __AP_HAL_EMPTY_SEMAPHORE_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptySemaphore : public AP_HAL::Semaphore {
public:

2
libraries/AP_HAL_Empty/Storage.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_STORAGE_H__
#define __AP_HAL_EMPTY_STORAGE_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyStorage : public AP_HAL::Storage {
public:

2
libraries/AP_HAL_Empty/UARTDriver.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_UARTDRIVER_H__
#define __AP_HAL_EMPTY_UARTDRIVER_H__
#include <AP_HAL_Empty.h>
#include "AP_HAL_Empty.h"
class Empty::EmptyUARTDriver : public AP_HAL::UARTDriver {
public:

2
libraries/AP_HAL_Empty/Util.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __AP_HAL_EMPTY_UTIL_H__
#define __AP_HAL_EMPTY_UTIL_H__
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#include "AP_HAL_Empty_Namespace.h"
class Empty::EmptyUtil : public AP_HAL::Util {

18
libraries/AP_HAL_Empty/examples/empty_example/empty_example.cpp

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
#include <AP_HAL.h>
#include <AP_Common.h>
#include <AP_Progmem.h>
#include <AP_Param.h>
#include <StorageManager.h>
#include <AP_Math.h>
#include <AP_HAL/AP_HAL.h>
#include <AP_Common/AP_Common.h>
#include <AP_Progmem/AP_Progmem.h>
#include <AP_Param/AP_Param.h>
#include <StorageManager/StorageManager.h>
#include <AP_Math/AP_Math.h>
#include <AP_HAL_AVR.h>
#include <AP_HAL_SITL.h>
#include <AP_HAL_Empty.h>
#include <AP_HAL_AVR/AP_HAL_AVR.h>
#include <AP_HAL_SITL/AP_HAL_SITL.h>
#include <AP_HAL_Empty/AP_HAL_Empty.h>
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;

Loading…
Cancel
Save