From 8b21dc9b22a906ce993ed2b35ff5098e30dc16b2 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 14 Dec 2015 13:20:28 -0200 Subject: [PATCH] AP_OpticalFlow: follow coding style - use pragma once - sort headers - add missing header - always include what you are using in the header --- libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp | 6 ++++-- libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.h | 11 +++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp b/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp index 57ad9140ac..87b61d9eb6 100644 --- a/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp +++ b/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp @@ -12,10 +12,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include -#include "OpticalFlow.h" #include "AP_OpticalFlow_Onboard.h" +#include + +#include "OpticalFlow.h" + #if CONFIG_HAL_BOARD == HAL_BOARD_LINUX &&\ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP //#define FLOWONBOARD_DEBUG 1 diff --git a/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.h b/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.h index e0a98a7a23..c5a84c3c60 100644 --- a/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.h +++ b/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.h @@ -12,13 +12,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef __AP_OPTICALFLOW_ONBOARD_H__ -#define __AP_OPTICALFLOW_ONBOARD_H__ +#pragma once #include -#include -#include #include +#include +#include + +#include "OpticalFlow.h" class AP_OpticalFlow_Onboard : public OpticalFlow_backend { @@ -31,5 +32,3 @@ private: void _get_gyro(float&, float&, float&); uint32_t _last_read_ms; }; - -#endif