From f637a29ab6d3c98a2cbfb46d223012ae483f3c35 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 17 Feb 2016 23:25:08 -0200 Subject: [PATCH] AC_PID: replace header guard with pragma once --- libraries/AC_PID/AC_HELI_PID.h | 6 +----- libraries/AC_PID/AC_P.h | 6 +----- libraries/AC_PID/AC_PID.h | 6 +----- libraries/AC_PID/AC_PI_2D.h | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/libraries/AC_PID/AC_HELI_PID.h b/libraries/AC_PID/AC_HELI_PID.h index 13df482104..5bbcba58e1 100644 --- a/libraries/AC_PID/AC_HELI_PID.h +++ b/libraries/AC_PID/AC_HELI_PID.h @@ -1,11 +1,9 @@ // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- +#pragma once /// @file AC_HELI_PID.h /// @brief Helicopter Specific Rate PID algorithm, with EEPROM-backed storage of constants. -#ifndef __AC_HELI_PID_H__ -#define __AC_HELI_PID_H__ - #include #include #include @@ -45,5 +43,3 @@ private: float _last_requested_rate; // Requested rate from last iteration, used to calculate rate change of requested rate }; - -#endif // __AC_HELI_PID_H__ diff --git a/libraries/AC_PID/AC_P.h b/libraries/AC_PID/AC_P.h index ae20746b70..013903205c 100644 --- a/libraries/AC_PID/AC_P.h +++ b/libraries/AC_PID/AC_P.h @@ -1,11 +1,9 @@ // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- +#pragma once /// @file AC_PD.h /// @brief Generic PID algorithm, with EEPROM-backed storage of constants. -#ifndef __AC_P_H__ -#define __AC_P_H__ - #include #include #include @@ -67,5 +65,3 @@ public: private: AP_Float _kp; }; - -#endif // __AC_P_H__ diff --git a/libraries/AC_PID/AC_PID.h b/libraries/AC_PID/AC_PID.h index 6c157c44f9..ac85a49f0e 100644 --- a/libraries/AC_PID/AC_PID.h +++ b/libraries/AC_PID/AC_PID.h @@ -1,11 +1,9 @@ // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- +#pragma once /// @file AC_PID.h /// @brief Generic PID algorithm, with EEPROM-backed storage of constants. -#ifndef __AC_PID_H__ -#define __AC_PID_H__ - #include #include #include @@ -106,5 +104,3 @@ protected: DataFlash_Class::PID_Info _pid_info; }; - -#endif // __AC_PID_H__ diff --git a/libraries/AC_PID/AC_PI_2D.h b/libraries/AC_PID/AC_PI_2D.h index f7c182d647..2d24c88113 100644 --- a/libraries/AC_PID/AC_PI_2D.h +++ b/libraries/AC_PID/AC_PI_2D.h @@ -1,11 +1,9 @@ // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- +#pragma once /// @file AC_PI_2D.h /// @brief Generic PID algorithm, with EEPROM-backed storage of constants. -#ifndef __AC_PI_2D_H__ -#define __AC_PI_2D_H__ - #include #include #include @@ -94,5 +92,3 @@ protected: Vector2f _input; // last input for derivative float _filt_alpha; // input filter alpha }; - -#endif // __AC_PI_2D_H__