AP_Compass: change UAVCAN_ENABLED to DRONECAN_ENABLED

This commit is contained in:
Andrew Tridgell 2023-04-08 13:58:13 +10:00
parent 8d21ef71d3
commit dc40e1e7c3
5 changed files with 12 additions and 12 deletions

View File

@ -24,7 +24,7 @@
#include "AP_Compass_LIS3MDL.h"
#include "AP_Compass_AK09916.h"
#include "AP_Compass_QMC5883L.h"
#if AP_COMPASS_UAVCAN_ENABLED
#if AP_COMPASS_DRONECAN_ENABLED
#include "AP_Compass_DroneCAN.h"
#endif
#include "AP_Compass_MMC3416.h"
@ -1449,7 +1449,7 @@ void Compass::_detect_backends(void)
#endif
#if AP_COMPASS_UAVCAN_ENABLED
#if AP_COMPASS_DRONECAN_ENABLED
if (_driver_enabled(DRIVER_UAVCAN)) {
for (uint8_t i=0; i<COMPASS_MAX_BACKEND; i++) {
AP_Compass_Backend* _uavcan_backend = AP_Compass_UAVCAN::probe(i);
@ -1519,7 +1519,7 @@ void Compass::_detect_backends(void)
}
#endif // #if COMPASS_MAX_UNREG_DEV > 0
}
#endif // AP_COMPASS_UAVCAN_ENABLED
#endif // AP_COMPASS_DRONECAN_ENABLED
if (_backend_count == 0 ||
_compass_count == 0) {
@ -1608,7 +1608,7 @@ void Compass::_reset_compass_id()
void
Compass::_detect_runtime(void)
{
#if AP_COMPASS_UAVCAN_ENABLED
#if AP_COMPASS_DRONECAN_ENABLED
if (!available()) {
return;
}
@ -1632,7 +1632,7 @@ Compass::_detect_runtime(void)
CHECK_UNREG_LIMIT_RETURN;
}
}
#endif // AP_COMPASS_UAVCAN_ENABLED
#endif // AP_COMPASS_DRONECAN_ENABLED
}
bool

View File

@ -453,7 +453,7 @@ private:
#if AP_COMPASS_MMC3416_ENABLED
DRIVER_MMC3416 =9,
#endif
#if AP_COMPASS_UAVCAN_ENABLED
#if AP_COMPASS_DRONECAN_ENABLED
DRIVER_UAVCAN =11,
#endif
#if AP_COMPASS_QMC5883L_ENABLED

View File

@ -15,7 +15,7 @@
#include "AP_Compass_DroneCAN.h"
#if AP_COMPASS_UAVCAN_ENABLED
#if AP_COMPASS_DRONECAN_ENABLED
#include <AP_HAL/AP_HAL.h>
@ -205,4 +205,4 @@ void AP_Compass_UAVCAN::read(void)
{
drain_accumulated_samples(_instance);
}
#endif // AP_COMPASS_UAVCAN_ENABLED
#endif // AP_COMPASS_DRONECAN_ENABLED

View File

@ -2,7 +2,7 @@
#include "AP_Compass.h"
#if AP_COMPASS_UAVCAN_ENABLED
#if AP_COMPASS_DRONECAN_ENABLED
#include "AP_Compass_Backend.h"
@ -47,4 +47,4 @@ private:
static HAL_Semaphore _sem_registry;
};
#endif // AP_COMPASS_UAVCAN_ENABLED
#endif // AP_COMPASS_DRONECAN_ENABLED

View File

@ -25,8 +25,8 @@
#define AP_COMPASS_SITL_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && AP_SIM_ENABLED)
#endif
#ifndef AP_COMPASS_UAVCAN_ENABLED
#define AP_COMPASS_UAVCAN_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_LIBUAVCAN_DRIVERS)
#ifndef AP_COMPASS_DRONECAN_ENABLED
#define AP_COMPASS_DRONECAN_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_LIBUAVCAN_DRIVERS)
#endif
// i2c-based compasses: