HAL_ChibiOS: disable SLCAN for minimize feature enabled

This commit is contained in:
Siddharth Purohit 2019-01-29 07:33:32 +05:30 committed by Randy Mackay
parent 816c339e4d
commit 7a2668ae1a
3 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,7 @@
#include "CANSerialRouter.h" #include "CANSerialRouter.h"
#if HAL_WITH_UAVCAN #if HAL_WITH_UAVCAN && !HAL_MINIMIZE_FEATURES
#include <AP_SerialManager/AP_SerialManager.h> #include <AP_SerialManager/AP_SerialManager.h>
#include <AP_BoardConfig/AP_BoardConfig_CAN.h> #include <AP_BoardConfig/AP_BoardConfig_CAN.h>
SLCANRouter* SLCANRouter::_singleton = nullptr; SLCANRouter* SLCANRouter::_singleton = nullptr;

View File

@ -19,7 +19,7 @@
#include "AP_HAL_ChibiOS.h" #include "AP_HAL_ChibiOS.h"
#if HAL_WITH_UAVCAN #if HAL_WITH_UAVCAN && !HAL_MINIMIZE_FEATURES
#include "CAN.h" #include "CAN.h"
#include <AP_UAVCAN/AP_UAVCAN_SLCAN.h> #include <AP_UAVCAN/AP_UAVCAN_SLCAN.h>

View File

@ -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 * Store with timeout into the FIFO buffer and signal update event
*/ */
rx_queue_.push(frame, utc_usec, 0); rx_queue_.push(frame, utc_usec, 0);
#if !HAL_MINIMIZE_FEATURES
slcan_router().route_frame_to_slcan(this, frame, utc_usec); slcan_router().route_frame_to_slcan(this, frame, utc_usec);
#endif
had_activity_ = true; had_activity_ = true;
update_event_.signalFromInterrupt(); update_event_.signalFromInterrupt();