AP_HAL: follow coding style

This commit is contained in:
Lucas De Marchi 2015-12-14 10:37:56 -02:00 committed by Andrew Tridgell
parent 2b681f2f13
commit c7668479bb
2 changed files with 8 additions and 9 deletions

View File

@ -33,7 +33,7 @@ public:
AP_HAL::RCOutput* _rcout,
AP_HAL::Scheduler* _scheduler,
AP_HAL::Util* _util,
AP_HAL::OpticalFlow* _opticalflow)
AP_HAL::OpticalFlow *_opticalflow)
:
uartA(_uartA),
uartB(_uartB),
@ -91,8 +91,8 @@ public:
AP_HAL::RCInput* rcin;
AP_HAL::RCOutput* rcout;
AP_HAL::Scheduler* scheduler;
AP_HAL::Util* util;
AP_HAL::OpticalFlow* opticalflow;
AP_HAL::Util *util;
AP_HAL::OpticalFlow *opticalflow;
};
#endif // __AP_HAL_HAL_H__

View File

@ -12,13 +12,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __AP_HAL_OPTICALFLOW_H__
#define __AP_HAL_OPTICALFLOW_H__
#pragma once
class AP_HAL::OpticalFlow {
public:
FUNCTOR_TYPEDEF(Gyro_Cb, void, float&, float&, float&);
virtual void init(Gyro_Cb) = 0;
class Data_Frame {
public:
float pixel_flow_x_integral;
@ -28,7 +25,9 @@ public:
uint32_t delta_time;
uint8_t quality;
};
FUNCTOR_TYPEDEF(Gyro_Cb, void, float&, float&, float&);
virtual void init(Gyro_Cb) = 0;
virtual bool read(Data_Frame& frame) = 0;
};
#endif