Skip to content

Commit

Permalink
listener print strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Jul 26, 2019
1 parent a462bfe commit 9aff6d7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion msg/log_message.msg
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion msg/mavlink_log.msg
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion msg/qshell_req.msg
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion msg/task_stack_info.msg
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions msg/tools/px_generate_uorb_topic_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 + ");")
Expand Down

0 comments on commit 9aff6d7

Please sign in to comment.