diff options
author | Christian Balcom <robot.inventor@gmail.com> | 2022-08-05 04:18:24 +0300 |
---|---|---|
committer | Christian Balcom <robot.inventor@gmail.com> | 2022-08-05 05:19:51 +0300 |
commit | 99490162a781f938bd8cfd40a7c894c2cb0b5857 (patch) | |
tree | 737dcfebf364be28cb3e4f0f16c00e25d66e144e /generator | |
parent | 2b98db92be218c63a4bbc68a90d0502cb1011d49 (diff) |
Generate MSGTYPE definitions for UENUM fields
Diffstat (limited to 'generator')
-rwxr-xr-x | generator/nanopb_generator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 0bec974..c9fc4cf 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -1422,7 +1422,7 @@ class Message(ProtoElement): result += '#define %s_DEFAULT NULL\n' % Globals.naming_style.define_name(self.name) for field in sorted_fields: - if field.pbtype in ['MESSAGE', 'MSG_W_CB']: + if field.pbtype in ['MESSAGE', 'MSG_W_CB', "UENUM"]: if field.rules == 'ONEOF': result += "#define %s_%s_%s_MSGTYPE %s\n" % ( Globals.naming_style.type_name(self.name), |