Sub: HAL_PROXIMITY_ENABLED replaces PROXIMITY_ENABLED

This commit is contained in:
Randy Mackay 2021-03-25 17:09:38 +09:00
parent 91fa40aea6
commit dbecf363f3
4 changed files with 4 additions and 14 deletions

View File

@ -630,7 +630,7 @@ const AP_Param::Info Sub::var_info[] = {
*/
const AP_Param::GroupInfo ParametersG2::var_info[] = {
#if PROXIMITY_ENABLED == ENABLED
#if HAL_PROXIMITY_ENABLED
// @Group: PRX
// @Path: ../libraries/AP_Proximity/AP_Proximity.cpp
AP_SUBGROUPINFO(proximity, "PRX", 2, ParametersG2, AP_Proximity),

View File

@ -324,7 +324,7 @@ public:
AP_Gripper gripper;
#endif
#if PROXIMITY_ENABLED == ENABLED
#if HAL_PROXIMITY_ENABLED
// proximity (aka object avoidance) library
AP_Proximity proximity;
#endif

View File

@ -66,6 +66,7 @@
#include <AP_JSButton/AP_JSButton.h> // Joystick/gamepad button function assignment
#include <AP_LeakDetector/AP_LeakDetector.h> // Leak detector
#include <AP_TemperatureSensor/TSYS01.h>
#include <AP_Proximity/AP_Proximity.h>
// Local modules
#include "defines.h"
@ -93,10 +94,6 @@
#include <AP_Gripper/AP_Gripper.h> // gripper stuff
#endif
#if PROXIMITY_ENABLED == ENABLED
#include <AP_Proximity/AP_Proximity.h>
#endif
#if AVOIDANCE_ENABLED == ENABLED
#include <AC_Avoidance/AC_Avoid.h> // Stop at fence library
#endif

View File

@ -88,17 +88,10 @@
# define AVOIDANCE_ENABLED DISABLED
#endif
#if AVOIDANCE_ENABLED == ENABLED // Avoidance Library relies on Proximity and Fence
# define PROXIMITY_ENABLED ENABLED
#if AVOIDANCE_ENABLED == ENABLED // Avoidance Library relies on Fence
# define FENCE_ENABLED ENABLED
#endif
// Proximity sensor
//
#ifndef PROXIMITY_ENABLED
# define PROXIMITY_ENABLED DISABLED
#endif
#ifndef MAV_SYSTEM_ID
# define MAV_SYSTEM_ID 1
#endif