mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Linux SocketCAN: Missing initializer warning fix
This commit is contained in:
parent
9044cd17c4
commit
eebf0bfcf5
@ -61,7 +61,9 @@ class SocketCanIface : public uavcan::ICanIface
|
||||
{
|
||||
static inline ::can_frame makeSocketCanFrame(const uavcan::CanFrame& uavcan_frame)
|
||||
{
|
||||
::can_frame sockcan_frame { uavcan_frame.id& uavcan::CanFrame::MaskExtID, uavcan_frame.dlc, { } };
|
||||
::can_frame sockcan_frame = ::can_frame();
|
||||
sockcan_frame.can_id = uavcan_frame.id & uavcan::CanFrame::MaskExtID;
|
||||
sockcan_frame.can_dlc = uavcan_frame.dlc;
|
||||
(void)std::copy(uavcan_frame.data, uavcan_frame.data + uavcan_frame.dlc, sockcan_frame.data);
|
||||
if (uavcan_frame.isExtended())
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user