mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_PiccoloCAN: added selective build of PiccoloCAN
This commit is contained in:
parent
ace0006a4e
commit
9821d52b72
libraries/AP_PiccoloCAN
@ -19,10 +19,10 @@
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_AHRS/AP_AHRS.h>
|
||||
|
||||
#if HAL_WITH_UAVCAN
|
||||
|
||||
#include "AP_PiccoloCAN.h"
|
||||
|
||||
#if HAL_PICCOLO_CAN_ENABLE
|
||||
|
||||
#include <uavcan/uavcan.hpp>
|
||||
#include <uavcan/driver/can.hpp>
|
||||
|
||||
@ -621,4 +621,5 @@ uint32_t getESCVelocityPacketID(const void* pkt)
|
||||
}
|
||||
|
||||
|
||||
#endif // HAL_WITH_UAVCAN
|
||||
#endif // HAL_PICCOLO_CAN_ENABLE
|
||||
|
||||
|
@ -27,6 +27,11 @@
|
||||
#define PICCOLO_CAN_MAX_NUM_ESC 12
|
||||
#define PICCOLO_CAN_MAX_GROUP_ESC (PICCOLO_CAN_MAX_NUM_ESC / 4)
|
||||
|
||||
#ifndef HAL_PICCOLO_CAN_ENABLE
|
||||
#define HAL_PICCOLO_CAN_ENABLE (HAL_WITH_UAVCAN && !HAL_MINIMIZE_FEATURES)
|
||||
#endif
|
||||
|
||||
#if HAL_PICCOLO_CAN_ENABLE
|
||||
|
||||
class AP_PiccoloCAN : public AP_HAL::CANProtocol
|
||||
{
|
||||
@ -118,3 +123,5 @@ private:
|
||||
} _esc_info[PICCOLO_CAN_MAX_NUM_ESC];
|
||||
|
||||
};
|
||||
|
||||
#endif // HAL_PICCOLO_CAN_ENABLE
|
||||
|
Loading…
Reference in New Issue
Block a user