mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_HAL_ChibiOS: use get_HAL_mutable() to install new CAN interfaces
Avoids dubious extern redefinition.
This commit is contained in:
parent
008c0baf5f
commit
87fef1ae5d
@ -85,7 +85,7 @@
|
||||
#error "Unsupported MCU for FDCAN"
|
||||
#endif
|
||||
|
||||
extern AP_HAL::HAL& hal;
|
||||
extern const AP_HAL::HAL& hal;
|
||||
|
||||
#define STR(x) #x
|
||||
#define XSTR(x) STR(x)
|
||||
@ -568,7 +568,7 @@ bool CANIface::init(const uint32_t bitrate, const uint32_t fdbitrate, const Oper
|
||||
if (can_ifaces[self_index_] == nullptr) {
|
||||
can_ifaces[self_index_] = this;
|
||||
#if !defined(HAL_BOOTLOADER_BUILD)
|
||||
hal.can[self_index_] = this;
|
||||
AP_HAL::get_HAL_mutable().can[self_index_] = this;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
extern AP_HAL::HAL& hal;
|
||||
extern const AP_HAL::HAL& hal;
|
||||
|
||||
using namespace ChibiOS;
|
||||
|
||||
@ -846,7 +846,7 @@ bool CANIface::init(const uint32_t bitrate, const CANIface::OperatingMode mode)
|
||||
if (can_ifaces[self_index_] == nullptr) {
|
||||
can_ifaces[self_index_] = this;
|
||||
#if !defined(HAL_BOOTLOADER_BUILD)
|
||||
hal.can[self_index_] = this;
|
||||
AP_HAL::get_HAL_mutable().can[self_index_] = this;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user