AP_OpticalFlow: replace header guard with pragma once
This commit is contained in:
parent
09d926fa11
commit
008e3c9810
@ -1,7 +1,5 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
#ifndef AP_OpticalFlow_HIL_H
|
||||
#define AP_OpticalFlow_HIL_H
|
||||
#pragma once
|
||||
|
||||
#include "OpticalFlow.h"
|
||||
|
||||
@ -17,6 +15,3 @@ public:
|
||||
// update - read latest values from sensor and fill in x,y and totals.
|
||||
void update(void);
|
||||
};
|
||||
|
||||
#endif // AP_OpticalFlow_HIL_H
|
||||
|
||||
|
@ -4,9 +4,7 @@
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef AP_OpticalFlow_Linux_H
|
||||
#define AP_OpticalFlow_Linux_H
|
||||
#pragma once
|
||||
|
||||
#include "OpticalFlow.h"
|
||||
|
||||
@ -82,5 +80,3 @@ private:
|
||||
uint16_t num_errors = 0;
|
||||
uint32_t last_read_ms = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,7 +1,5 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
#ifndef AP_OpticalFlow_PX4_H
|
||||
#define AP_OpticalFlow_PX4_H
|
||||
#pragma once
|
||||
|
||||
#include "OpticalFlow.h"
|
||||
|
||||
@ -21,5 +19,3 @@ private:
|
||||
int _fd; // file descriptor for sensor
|
||||
uint64_t _last_timestamp; // time of last update (used to avoid processing old reports)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,3 @@
|
||||
#ifndef __OpticalFlow_H__
|
||||
#define __OpticalFlow_H__
|
||||
/*
|
||||
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
|
||||
@ -14,6 +12,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* OpticalFlow.h - OpticalFlow Base Class for Ardupilot
|
||||
@ -98,5 +97,3 @@ private:
|
||||
#include "AP_OpticalFlow_HIL.h"
|
||||
#include "AP_OpticalFlow_PX4.h"
|
||||
#include "AP_OpticalFlow_Linux.h"
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,3 @@
|
||||
#ifndef __OpticalFlow_backend_H__
|
||||
#define __OpticalFlow_backend_H__
|
||||
/*
|
||||
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
|
||||
@ -14,6 +12,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
OpticalFlow backend class for ArduPilot
|
||||
@ -48,6 +47,3 @@ protected:
|
||||
// get the yaw angle in radians
|
||||
float _yawAngleRad(void) const { return radians(float(frontend._yawAngle_cd) * 0.01f); }
|
||||
};
|
||||
|
||||
#endif // __OpticalFlow_backend_H__
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user