diff --git a/libraries/AP_HAL_PX4/AP_HAL_PX4.h b/libraries/AP_HAL_PX4/AP_HAL_PX4.h index fa5cc6fcd8..332a91ff38 100644 --- a/libraries/AP_HAL_PX4/AP_HAL_PX4.h +++ b/libraries/AP_HAL_PX4/AP_HAL_PX4.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_H__ -#define __AP_HAL_PX4_H__ +#pragma once #include @@ -8,5 +6,3 @@ #include "HAL_PX4_Class.h" #endif // CONFIG_HAL_BOARD -#endif // __AP_HAL_PX4_H__ - diff --git a/libraries/AP_HAL_PX4/AP_HAL_PX4_Namespace.h b/libraries/AP_HAL_PX4/AP_HAL_PX4_Namespace.h index b55fe12216..1642b466a6 100644 --- a/libraries/AP_HAL_PX4/AP_HAL_PX4_Namespace.h +++ b/libraries/AP_HAL_PX4/AP_HAL_PX4_Namespace.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_NAMESPACE_H__ -#define __AP_HAL_PX4_NAMESPACE_H__ +#pragma once namespace PX4 { class PX4Scheduler; @@ -18,6 +16,3 @@ namespace PX4 { class PX4_I2C; class Semaphore; } - -#endif //__AP_HAL_PX4_NAMESPACE_H__ - diff --git a/libraries/AP_HAL_PX4/AnalogIn.h b/libraries/AP_HAL_PX4/AnalogIn.h index 657c2707c8..c52ea0b6ec 100644 --- a/libraries/AP_HAL_PX4/AnalogIn.h +++ b/libraries/AP_HAL_PX4/AnalogIn.h @@ -1,7 +1,5 @@ /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -#ifndef __AP_HAL_PX4_ANALOGIN_H__ -#define __AP_HAL_PX4_ANALOGIN_H__ +#pragma once #include "AP_HAL_PX4.h" #include @@ -82,4 +80,3 @@ private: void next_stop_pin(void); }; -#endif // __AP_HAL_PX4_ANALOGIN_H__ diff --git a/libraries/AP_HAL_PX4/GPIO.h b/libraries/AP_HAL_PX4/GPIO.h index 59fbcdbc8b..21461accdf 100644 --- a/libraries/AP_HAL_PX4/GPIO.h +++ b/libraries/AP_HAL_PX4/GPIO.h @@ -1,7 +1,5 @@ /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -#ifndef __AP_HAL_PX4_GPIO_H__ -#define __AP_HAL_PX4_GPIO_H__ +#pragma once #include "AP_HAL_PX4.h" @@ -67,5 +65,3 @@ public: private: uint8_t _v; }; - -#endif // __AP_HAL_PX4_GPIO_H__ diff --git a/libraries/AP_HAL_PX4/I2CDriver.h b/libraries/AP_HAL_PX4/I2CDriver.h index 5c579d9b12..f7039e5434 100644 --- a/libraries/AP_HAL_PX4/I2CDriver.h +++ b/libraries/AP_HAL_PX4/I2CDriver.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_I2CDRIVER_H__ -#define __AP_HAL_PX4_I2CDRIVER_H__ +#pragma once #include "AP_HAL_PX4.h" #include @@ -47,5 +45,3 @@ private: Empty::Semaphore semaphore; PX4_I2C *px4_i2c = nullptr; }; - -#endif // __AP_HAL_PX4_I2CDRIVER_H__ diff --git a/libraries/AP_HAL_PX4/RCInput.h b/libraries/AP_HAL_PX4/RCInput.h index 7cdd0301a8..e8282994ad 100644 --- a/libraries/AP_HAL_PX4/RCInput.h +++ b/libraries/AP_HAL_PX4/RCInput.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_RCINPUT_H__ -#define __AP_HAL_PX4_RCINPUT_H__ +#pragma once #include "AP_HAL_PX4.h" #include @@ -38,5 +36,3 @@ private: perf_counter_t _perf_rcin; pthread_mutex_t rcin_mutex; }; - -#endif // __AP_HAL_PX4_RCINPUT_H__ diff --git a/libraries/AP_HAL_PX4/RCOutput.h b/libraries/AP_HAL_PX4/RCOutput.h index 35899c1cd7..94b762b60a 100644 --- a/libraries/AP_HAL_PX4/RCOutput.h +++ b/libraries/AP_HAL_PX4/RCOutput.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_RCOUTPUT_H__ -#define __AP_HAL_PX4_RCOUTPUT_H__ +#pragma once #include "AP_HAL_PX4.h" #include @@ -63,5 +61,3 @@ private: void _arm_actuators(bool arm); void set_freq_fd(int fd, uint32_t chmask, uint16_t freq_hz); }; - -#endif // __AP_HAL_PX4_RCOUTPUT_H__ diff --git a/libraries/AP_HAL_PX4/Scheduler.h b/libraries/AP_HAL_PX4/Scheduler.h index da7ec90dae..c242352ff8 100644 --- a/libraries/AP_HAL_PX4/Scheduler.h +++ b/libraries/AP_HAL_PX4/Scheduler.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_SCHEDULER_H__ -#define __AP_HAL_PX4_SCHEDULER_H__ +#pragma once #include #if CONFIG_HAL_BOARD == HAL_BOARD_PX4 @@ -102,6 +100,3 @@ private: perf_counter_t _perf_delay; }; #endif -#endif // __AP_HAL_PX4_SCHEDULER_H__ - - diff --git a/libraries/AP_HAL_PX4/Storage.h b/libraries/AP_HAL_PX4/Storage.h index 01ae7d9e05..e97dbdc7f5 100644 --- a/libraries/AP_HAL_PX4/Storage.h +++ b/libraries/AP_HAL_PX4/Storage.h @@ -1,7 +1,4 @@ - - -#ifndef __AP_HAL_PX4_STORAGE_H__ -#define __AP_HAL_PX4_STORAGE_H__ +#pragma once #include #include "AP_HAL_PX4_Namespace.h" @@ -43,5 +40,3 @@ private: #endif void bus_lock(bool lock); }; - -#endif // __AP_HAL_PX4_STORAGE_H__ diff --git a/libraries/AP_HAL_PX4/UARTDriver.h b/libraries/AP_HAL_PX4/UARTDriver.h index bdde1b1ac0..73924ad203 100644 --- a/libraries/AP_HAL_PX4/UARTDriver.h +++ b/libraries/AP_HAL_PX4/UARTDriver.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_UARTDRIVER_H__ -#define __AP_HAL_PX4_UARTDRIVER_H__ +#pragma once #include "AP_HAL_PX4.h" #include @@ -80,5 +78,3 @@ private: pid_t _uart_owner_pid; }; - -#endif // __AP_HAL_PX4_UARTDRIVER_H__ diff --git a/libraries/AP_HAL_PX4/Util.h b/libraries/AP_HAL_PX4/Util.h index f5583ae495..801858347e 100644 --- a/libraries/AP_HAL_PX4/Util.h +++ b/libraries/AP_HAL_PX4/Util.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_PX4_UTIL_H__ -#define __AP_HAL_PX4_UTIL_H__ +#pragma once #include #include "AP_HAL_PX4_Namespace.h" @@ -64,5 +62,3 @@ private: int _safety_handle; PX4::NSHShellStream _shell_stream; }; - -#endif // __AP_HAL_PX4_UTIL_H__