AP_RangeFinder: enable sonar on Disco
This commit is contained in:
parent
018d8f732a
commit
e0047d81a2
@ -15,8 +15,9 @@
|
|||||||
#include <AP_HAL/AP_HAL.h>
|
#include <AP_HAL/AP_HAL.h>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#if (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP) && \
|
#if (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP || \
|
||||||
defined(HAVE_LIBIIO)
|
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO) && \
|
||||||
|
defined(HAVE_LIBIIO)
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -34,7 +35,6 @@ defined(HAVE_LIBIIO)
|
|||||||
#include "AP_RangeFinder_Bebop.h"
|
#include "AP_RangeFinder_Bebop.h"
|
||||||
#include <AP_HAL_Linux/Thread.h>
|
#include <AP_HAL_Linux/Thread.h>
|
||||||
#include <AP_HAL_Linux/GPIO.h>
|
#include <AP_HAL_Linux/GPIO.h>
|
||||||
#include <AP_HAL_Linux/GPIO_Bebop.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this mode is used at low altitude
|
* this mode is used at low altitude
|
||||||
|
@ -530,7 +530,8 @@ void RangeFinder::detect_instance(uint8_t instance)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP && defined(HAVE_LIBIIO)
|
#if (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP || \
|
||||||
|
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO) && defined(HAVE_LIBIIO)
|
||||||
if (type == RangeFinder_TYPE_BEBOP) {
|
if (type == RangeFinder_TYPE_BEBOP) {
|
||||||
if (AP_RangeFinder_Bebop::detect(*this, instance)) {
|
if (AP_RangeFinder_Bebop::detect(*this, instance)) {
|
||||||
state[instance].instance = instance;
|
state[instance].instance = instance;
|
||||||
|
Loading…
Reference in New Issue
Block a user