AP_OpticalFlow: fixed shadowed variable build warning

This commit is contained in:
Andrew Tridgell 2016-11-05 10:00:49 +11:00
parent 9e7e1b2f01
commit 76b2759317
2 changed files with 7 additions and 5 deletions

View File

@ -17,6 +17,12 @@
extern const AP_HAL::HAL& hal;
OpticalFlow_backend::OpticalFlow_backend(OpticalFlow &_frontend) :
frontend(_frontend)
{
_sem = hal.util->new_semaphore();
}
// update the frontend
void OpticalFlow_backend::_update_frontend(const struct OpticalFlow::OpticalFlow_state &state)
{

View File

@ -20,17 +20,13 @@
#include "OpticalFlow.h"
extern const AP_HAL::HAL& hal;
class OpticalFlow_backend
{
friend class OpticalFlow;
public:
// constructor
OpticalFlow_backend(OpticalFlow &_frontend) : frontend(_frontend) {
_sem = hal.util->new_semaphore();
}
OpticalFlow_backend(OpticalFlow &_frontend);
// init - initialise sensor
virtual void init() = 0;