Index: scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja =================================================================== diff -u -re3aaafd456d2a3b791400e90fbc380372da56ff9 -r53d80d0edc1c441132b13f387f5f13570a7aafd2 --- scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja (.../MsgDefs_h.jinja) (revision e3aaafd456d2a3b791400e90fbc380372da56ff9) +++ scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja (.../MsgDefs_h.jinja) (revision 53d80d0edc1c441132b13f387f5f13570a7aafd2) @@ -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 %}