mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 14:48:54 +08:00
listener print strings
This commit is contained in:
+1
-1
@@ -3,4 +3,4 @@
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint8 severity # log level (same as in the linux kernel, starting with 0)
|
||||
uint8[127] text
|
||||
char[127] text
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint8[50] text
|
||||
char[50] text
|
||||
uint8 severity # log level (same as in the linux kernel, starting with 0)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
uint8[100] cmd
|
||||
char[100] cmd
|
||||
uint32 MAX_STRLEN = 100
|
||||
uint32 strlen
|
||||
uint32 sequence
|
||||
|
||||
@@ -5,4 +5,4 @@ uint64 timestamp # time since system start (microseconds)
|
||||
uint8 MAX_REPORT_TASK_NAME_LEN = 16
|
||||
|
||||
uint16 stack_free
|
||||
uint8[16] task_name
|
||||
char[16] task_name
|
||||
|
||||
@@ -303,6 +303,8 @@ def print_field(field):
|
||||
print("char device_id_buffer[80];")
|
||||
print("device::Device::device_id_print_buffer(device_id_buffer, sizeof(device_id_buffer), message.device_id);")
|
||||
print("PX4_INFO_RAW(\"\\tdevice_id: %d (%s) \\n\", message.device_id, device_id_buffer);")
|
||||
elif is_array and 'char' in field.type:
|
||||
print("PX4_INFO_RAW(\"\\t" + field.name + ": \\\"%." + str(array_length) + "s\\\" \\n\", message." + field.name + ");")
|
||||
else:
|
||||
print("PX4_INFO_RAW(\"\\t" + field.name + ": " +
|
||||
c_type + "\\n\", " + field_name + ");")
|
||||
|
||||
Reference in New Issue
Block a user