mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
msg generated print support boolean
This commit is contained in:
parent
bb49ac1933
commit
c199ca5193
@ -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 + "\");")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user