mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +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
|
# cast double
|
||||||
if field.type == "float32":
|
if field.type == "float32":
|
||||||
field_name = "(double)" + field_name
|
field_name = "(double)" + field_name
|
||||||
|
elif field.type == "bool":
|
||||||
|
c_type = '%s'
|
||||||
|
field_name = "(" + field_name + " ? \"True\" : \"False\")"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("printf(\"\\n\\t" + field.name + "\");")
|
print("printf(\"\\n\\t" + field.name + "\");")
|
||||||
|
|||||||
Reference in New Issue
Block a user