diff --git a/libraries/AP_UAVCAN/AP_UAVCAN.cpp b/libraries/AP_UAVCAN/AP_UAVCAN.cpp index 212fe4a3f8..3dba5e0060 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN.cpp +++ b/libraries/AP_UAVCAN/AP_UAVCAN.cpp @@ -357,9 +357,6 @@ void AP_UAVCAN::init(uint8_t driver_index, bool enable_filters) } _led_conf.devices_count = 0; - if (enable_filters) { - configureCanAcceptanceFilters(*_node); - } /* * Informing other nodes that we're ready to work. diff --git a/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.cpp b/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.cpp index 56c1cdfccd..ee10e5e6a2 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.cpp +++ b/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.cpp @@ -93,27 +93,6 @@ int16_t CanIface::receive(CanFrame& out_frame, MonotonicTime& out_ts_monotonic, return ret; } -/** - * Configure the hardware CAN filters. @ref CanFilterConfig. - * - * @return 0 = success, negative for error. - */ -int16_t CanIface::configureFilters(const CanFilterConfig* filter_configs, uint16_t num_configs) -{ - if (can_iface_ == UAVCAN_NULLPTR) { - return -1; - } - AP_HAL::CANIface::CanFilterConfig* hal_filter_configs = new AP_HAL::CANIface::CanFilterConfig[num_configs]; - if (hal_filter_configs == nullptr) { - return -1; - } - for (uint16_t i = 0; i < num_configs; i++) { - hal_filter_configs[i].id = filter_configs[i].id; - hal_filter_configs[i].mask = filter_configs[i].mask; - } - return can_iface_->configureFilters(hal_filter_configs, num_configs); -} - /** * Number of available hardware filters. */ diff --git a/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.h b/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.h index b1318b7ff7..0c3b23ba18 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.h +++ b/libraries/AP_UAVCAN/AP_UAVCAN_IfaceMgr.h @@ -39,9 +39,11 @@ public: virtual int16_t receive(CanFrame& out_frame, MonotonicTime& out_ts_monotonic, UtcTime& out_ts_utc, CanIOFlags& out_flags) override; - int16_t configureFilters(const CanFilterConfig* filter_configs, - uint16_t num_configs) override; - + virtual int16_t configureFilters(const CanFilterConfig* filter_configs, + uint16_t num_configs) override { + return 0; + } + uint16_t getNumFilters() const override; uint64_t getErrorCount() const override;