Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Balcom <robot.inventor@gmail.com>2022-08-05 04:18:24 +0300
committerChristian Balcom <robot.inventor@gmail.com>2022-08-05 05:19:51 +0300
commit99490162a781f938bd8cfd40a7c894c2cb0b5857 (patch)
tree737dcfebf364be28cb3e4f0f16c00e25d66e144e /generator
parent2b98db92be218c63a4bbc68a90d0502cb1011d49 (diff)
Generate MSGTYPE definitions for UENUM fields
Diffstat (limited to 'generator')
-rwxr-xr-xgenerator/nanopb_generator.py2
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),