AP_OpticalFlow: replace header guard with pragma once

This commit is contained in:
Lucas De Marchi 2016-02-17 23:25:42 -02:00
parent 09d926fa11
commit 008e3c9810
5 changed files with 5 additions and 25 deletions

View File

@ -1,7 +1,5 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#pragma once
#ifndef AP_OpticalFlow_HIL_H
#define AP_OpticalFlow_HIL_H
#include "OpticalFlow.h" #include "OpticalFlow.h"
@ -17,6 +15,3 @@ public:
// update - read latest values from sensor and fill in x,y and totals. // update - read latest values from sensor and fill in x,y and totals.
void update(void); void update(void);
}; };
#endif // AP_OpticalFlow_HIL_H

View File

@ -4,9 +4,7 @@
* Portions of this driver were borrowed from the PX4Firmware px4flow driver which can be found here: * Portions of this driver were borrowed from the PX4Firmware px4flow driver which can be found here:
* https://github.com/PX4/Firmware/blob/master/src/drivers/px4flow/px4flow.cpp * https://github.com/PX4/Firmware/blob/master/src/drivers/px4flow/px4flow.cpp
*/ */
#pragma once
#ifndef AP_OpticalFlow_Linux_H
#define AP_OpticalFlow_Linux_H
#include "OpticalFlow.h" #include "OpticalFlow.h"
@ -82,5 +80,3 @@ private:
uint16_t num_errors = 0; uint16_t num_errors = 0;
uint32_t last_read_ms = 0; uint32_t last_read_ms = 0;
}; };
#endif

View File

@ -1,7 +1,5 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#pragma once
#ifndef AP_OpticalFlow_PX4_H
#define AP_OpticalFlow_PX4_H
#include "OpticalFlow.h" #include "OpticalFlow.h"
@ -21,5 +19,3 @@ private:
int _fd; // file descriptor for sensor int _fd; // file descriptor for sensor
uint64_t _last_timestamp; // time of last update (used to avoid processing old reports) uint64_t _last_timestamp; // time of last update (used to avoid processing old reports)
}; };
#endif

View File

@ -1,5 +1,3 @@
#ifndef __OpticalFlow_H__
#define __OpticalFlow_H__
/* /*
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -14,6 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
/* /*
* OpticalFlow.h - OpticalFlow Base Class for Ardupilot * OpticalFlow.h - OpticalFlow Base Class for Ardupilot
@ -98,5 +97,3 @@ private:
#include "AP_OpticalFlow_HIL.h" #include "AP_OpticalFlow_HIL.h"
#include "AP_OpticalFlow_PX4.h" #include "AP_OpticalFlow_PX4.h"
#include "AP_OpticalFlow_Linux.h" #include "AP_OpticalFlow_Linux.h"
#endif

View File

@ -1,5 +1,3 @@
#ifndef __OpticalFlow_backend_H__
#define __OpticalFlow_backend_H__
/* /*
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -14,6 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
/* /*
OpticalFlow backend class for ArduPilot OpticalFlow backend class for ArduPilot
@ -48,6 +47,3 @@ protected:
// get the yaw angle in radians // get the yaw angle in radians
float _yawAngleRad(void) const { return radians(float(frontend._yawAngle_cd) * 0.01f); } float _yawAngleRad(void) const { return radians(float(frontend._yawAngle_cd) * 0.01f); }
}; };
#endif // __OpticalFlow_backend_H__