Browse Source

AP_OpticalFlow: fixed shadowed variable build warning

mission-4.1.18
Andrew Tridgell 8 years ago
parent
commit
76b2759317
  1. 6
      libraries/AP_OpticalFlow/OpticalFlow_backend.cpp
  2. 6
      libraries/AP_OpticalFlow/OpticalFlow_backend.h

6
libraries/AP_OpticalFlow/OpticalFlow_backend.cpp

@ -17,6 +17,12 @@ @@ -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)
{

6
libraries/AP_OpticalFlow/OpticalFlow_backend.h

@ -20,17 +20,13 @@ @@ -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;

Loading…
Cancel
Save