diff --git a/libraries/AP_HAL_ChibiOS/CANSerialRouter.cpp b/libraries/AP_HAL_ChibiOS/CANSerialRouter.cpp index 48440d11af..2dac476a1f 100644 --- a/libraries/AP_HAL_ChibiOS/CANSerialRouter.cpp +++ b/libraries/AP_HAL_ChibiOS/CANSerialRouter.cpp @@ -17,7 +17,7 @@ #include "CANSerialRouter.h" -#if HAL_WITH_UAVCAN +#if HAL_WITH_UAVCAN && !HAL_MINIMIZE_FEATURES #include #include SLCANRouter* SLCANRouter::_singleton = nullptr; diff --git a/libraries/AP_HAL_ChibiOS/CANSerialRouter.h b/libraries/AP_HAL_ChibiOS/CANSerialRouter.h index 8db7c0b122..6ee2622c8f 100644 --- a/libraries/AP_HAL_ChibiOS/CANSerialRouter.h +++ b/libraries/AP_HAL_ChibiOS/CANSerialRouter.h @@ -19,7 +19,7 @@ #include "AP_HAL_ChibiOS.h" -#if HAL_WITH_UAVCAN +#if HAL_WITH_UAVCAN && !HAL_MINIMIZE_FEATURES #include "CAN.h" #include diff --git a/libraries/AP_HAL_ChibiOS/CanIface.cpp b/libraries/AP_HAL_ChibiOS/CanIface.cpp index ec296df5e6..9f74cb6cba 100644 --- a/libraries/AP_HAL_ChibiOS/CanIface.cpp +++ b/libraries/AP_HAL_ChibiOS/CanIface.cpp @@ -759,8 +759,9 @@ void CanIface::handleRxInterrupt(uavcan::uint8_t fifo_index, uavcan::uint64_t ut * Store with timeout into the FIFO buffer and signal update event */ rx_queue_.push(frame, utc_usec, 0); + #if !HAL_MINIMIZE_FEATURES slcan_router().route_frame_to_slcan(this, frame, utc_usec); - +#endif had_activity_ = true; update_event_.signalFromInterrupt();