mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-28 02:33:58 -04:00
HAL_SITL: support arrays of CAN interfaces
allows for multi-bus in AP_Periph
This commit is contained in:
parent
3590fe36e8
commit
4f1c43862e
@ -53,6 +53,8 @@ using namespace HALSITL;
|
||||
|
||||
CANIface::CANSocketEventSource CANIface::evt_can_socket[HAL_NUM_CAN_IFACES];
|
||||
|
||||
uint8_t CANIface::next_interface;
|
||||
|
||||
static can_frame makeSocketCanFrame(const AP_HAL::CANFrame& uavcan_frame)
|
||||
{
|
||||
can_frame sockcan_frame { uavcan_frame.id& AP_HAL::CANFrame::MaskExtID, uavcan_frame.dlc, { } };
|
||||
|
@ -62,6 +62,9 @@ public:
|
||||
, _max_frames_in_socket_tx_queue(2)
|
||||
{ }
|
||||
|
||||
static uint8_t next_interface;
|
||||
CANIface() : CANIface(next_interface++) {}
|
||||
|
||||
~CANIface() { }
|
||||
|
||||
// Initialise CAN Peripheral
|
||||
|
Loading…
Reference in New Issue
Block a user