diff --git a/libuavcan/dsdl_compiler/data_type_template.tmpl b/libuavcan/dsdl_compiler/data_type_template.tmpl index 9035a49c54..c9639802fb 100644 --- a/libuavcan/dsdl_compiler/data_type_template.tmpl +++ b/libuavcan/dsdl_compiler/data_type_template.tmpl @@ -95,6 +95,8 @@ struct ${t.cpp_type_name} ${':' if idx == 0 else ','} ${a.name}() % endfor { + enum { MaxByteLen = ::uavcan::BitLenToByteLen::Result }; + ::uavcan::StaticAssert::check(); #if UAVCAN_DEBUG /* * Cross-checking MaxBitLen provided by the DSDL compiler.