AP_Rangefinder: fix compilation for Bebop

This commit is contained in:
Pierre Kancir 2019-05-07 14:35:31 +02:00 committed by Lucas De Marchi
parent 8a4553ba0a
commit 209b0300a5
3 changed files with 4 additions and 4 deletions

View File

@ -62,8 +62,8 @@ static const uint16_t waveform_mode1[32] = {
1675, 1540, 1492, 1374, 1292 1675, 1540, 1492, 1374, 1292
}; };
AP_RangeFinder_Bebop::AP_RangeFinder_Bebop(RangeFinder::RangeFinder_State &_state) : AP_RangeFinder_Bebop::AP_RangeFinder_Bebop(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params) :
AP_RangeFinder_Backend(_state), AP_RangeFinder_Backend(_state, _params),
_thread(new Linux::Thread(FUNCTOR_BIND_MEMBER(&AP_RangeFinder_Bebop::_loop, void))) _thread(new Linux::Thread(FUNCTOR_BIND_MEMBER(&AP_RangeFinder_Bebop::_loop, void)))
{ {
_init(); _init();

View File

@ -88,7 +88,7 @@ struct adc_capture {
class AP_RangeFinder_Bebop : public AP_RangeFinder_Backend { class AP_RangeFinder_Bebop : public AP_RangeFinder_Backend {
public: public:
AP_RangeFinder_Bebop(RangeFinder::RangeFinder_State &_state); AP_RangeFinder_Bebop(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params);
~AP_RangeFinder_Bebop(void); ~AP_RangeFinder_Bebop(void);
static bool detect(); static bool detect();

View File

@ -458,7 +458,7 @@ void RangeFinder::detect_instance(uint8_t instance, uint8_t& serial_instance)
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO) && defined(HAVE_LIBIIO) CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO) && defined(HAVE_LIBIIO)
case RangeFinder_TYPE_BEBOP: case RangeFinder_TYPE_BEBOP:
if (AP_RangeFinder_Bebop::detect()) { if (AP_RangeFinder_Bebop::detect()) {
drivers[instance] = new AP_RangeFinder_Bebop(state[instance]); drivers[instance] = new AP_RangeFinder_Bebop(state[instance], params[instance]);
} }
break; break;
#endif #endif