mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-15 09:47:35 +08:00
msg generated print support boolean
This commit is contained in:
committed by
Lorenz Meier
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 + "\");")
|
||||
|
||||
Reference in New Issue
Block a user