mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-24 16:01:53 +08:00
msg generated print support boolean
This commit is contained in:
1 parent
bb49ac1933
commit
c199ca5193
1 file changed
+3
@@ -234,6 +234,9 @@ def print_field(field):
|
||||
# cast double
|
||||
if field.type == "float32":
|
||||
field_name = "(double)" + field_name
|
||||
elif field.type == "bool":
|
||||
c_type = '%s'
|
||||
field_name = "(" + field_name + " ? \"True\" : \"False\")"
|
||||
|
||||
else:
|
||||
print("printf(\"\\n\\t" + field.name + "\");")
|
||||
|
||||
Reference in new issue
Block a user