Index: scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja =================================================================== diff -u -rfd9c43b00259567ff49a3d9b31b98df75b47bc52 -r808df723cf9d1b0097796815e5229abfa18f2d8f --- scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja (.../MsgDefs_h.jinja) (revision fd9c43b00259567ff49a3d9b31b98df75b47bc52) +++ scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja (.../MsgDefs_h.jinja) (revision 808df723cf9d1b0097796815e5229abfa18f2d8f) @@ -65,7 +65,11 @@ // payload: {{ msg_cpp.field_list(msg_id_value) | join(", ") }} struct {{ msg['msg_name'] }}Payload { {%- for field in msg['cpp_struct']['payload'] %} - {{ field['cpp_type'] }} {{ field['name'] }}; +{%- if field['type'] == "union" %} + union {{ field['name'] }}; +{%- else %} + Types::{{ field['type'] }} {{ field['name'] }}; +{%- endif %} {%- endfor %} {%- if msg['cpp_struct']['payload'] | length %} {% endif %} @@ -88,9 +92,11 @@ void dump() const; }; {%- endfor %} -{%- if cpp_namespace is defined and cpp_namespace is not none %} +{%- if proto is defined %} QByteArray canMessageToProtobufByteArray(const QDateTime ×tamp, const QString &deviceSerialNumber, const Can::Message &msg); +{%- endif %} +{%- if cpp_namespace is defined and cpp_namespace is not none %} } // namespace {{ cpp_namespace }} {%- endif %}