AP_UAVCAN: disable UAVCAN library when libuavcan drivers are disabled

This commit is contained in:
Siddharth Purohit 2020-07-30 23:23:31 +05:30 committed by Peter Barker
parent 62df67a4b8
commit d8852615ed
2 changed files with 8 additions and 5 deletions

View File

@ -14,8 +14,11 @@
*
* Author: Eugene Shamaev, Siddharth Bharat Purohit
*/
#ifndef AP_UAVCAN_H_
#define AP_UAVCAN_H_
#pragma once
#include <AP_HAL/AP_HAL.h>
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
#include <uavcan/uavcan.hpp>
#include "AP_UAVCAN_DNA_Server.h"
@ -246,4 +249,4 @@ private:
static bool is_esc_data_index_valid(const uint8_t index);
};
#endif /* AP_UAVCAN_H_ */
#endif // #if HAL_ENABLE_LIBUAVCAN_DRIVERS

View File

@ -18,7 +18,7 @@
#include "AP_UAVCAN_IfaceMgr.h"
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
#include "AP_UAVCAN_Clock.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_CANManager/AP_CANManager.h>
@ -256,4 +256,4 @@ int16_t CanIfaceMgr::select(CanSelectMasks& inout_masks,
inout_masks = makeSelectMasks(in_masks, pending_tx); // Return what we got even if none of the requested events are set
return 1; // Return value doesn't matter as long as it is non-negative
}
#endif
#endif //HAL_ENABLE_LIBUAVCAN_DRIVERSs