mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 21:43:33 +08:00
Checking the max transfer payload length for generated types
This commit is contained in:
@@ -95,6 +95,8 @@ struct ${t.cpp_type_name}
|
||||
${':' if idx == 0 else ','} ${a.name}()
|
||||
% endfor
|
||||
{
|
||||
enum { MaxByteLen = ::uavcan::BitLenToByteLen<MaxBitLen>::Result };
|
||||
::uavcan::StaticAssert<int(MaxByteLen) <= int(::uavcan::MaxTransferPayloadLen)>::check();
|
||||
#if UAVCAN_DEBUG
|
||||
/*
|
||||
* Cross-checking MaxBitLen provided by the DSDL compiler.
|
||||
|
||||
Reference in New Issue
Block a user