From 0a02a4c503c660df33adbbb7c5751d2415dfb0ff Mon Sep 17 00:00:00 2001 From: David L Sprague Date: Sun, 19 Mar 2017 14:57:44 -0700 Subject: [PATCH] Fixed Issue #6596 Fixed the block comments at the top of the source file and the help message for the script (starting at line 279) so that an underscore ("_") character is correctly described as the separator for the first message field name rather than a period character "." --- Tools/sdlog2/sdlog2_dump.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Tools/sdlog2/sdlog2_dump.py b/Tools/sdlog2/sdlog2_dump.py index 8d75994d29..4cc2100224 100755 --- a/Tools/sdlog2/sdlog2_dump.py +++ b/Tools/sdlog2/sdlog2_dump.py @@ -4,7 +4,9 @@ from __future__ import print_function """Dump binary log generated by PX4's sdlog2 or APM as CSV -Usage: python sdlog2_dump.py [-v] [-e] [-d delimiter] [-n null] [-m MSG[.field1,field2,...]] +Usage: python sdlog2_dump.py [-v] [-e] [-d delimiter] [-n null] [-m MSG[_field1,field2,...]] + +Example Usage: python sdlog2_dump.py log.bin -m GPS_Lat,Lng -m AHR2_Roll,Pitch,Yaw -v Use plain debug output instead of CSV. @@ -14,9 +16,10 @@ Usage: python sdlog2_dump.py [-v] [-e] [-d delimiter] [-n null] [-m MS -n Use "null" as placeholder for empty values in CSV. Default is empty. - -m MSG[.field1,field2,...] + -m MSG[_field1,field2,...] Dump only messages of specified type, and only specified fields. - Multiple -m options allowed.""" + Multiple -m options allowed. + """ __author__ = "Anton Babushkin" __version__ = "1.2" @@ -273,12 +276,12 @@ class SDLog2Parser: def _main(): if len(sys.argv) < 2: - print("Usage: python sdlog2_dump.py [-v] [-e] [-d delimiter] [-n null] [-m MSG[.field1,field2,...]] [-t TIME_MSG_NAME]\n") + print("Usage: python sdlog2_dump.py [-v] [-e] [-d delimiter] [-n null] [-m MSG[_field1,field2,...]] [-t TIME_MSG_NAME]\n") print("\t-v\tUse plain debug output instead of CSV.\n") print("\t-e\tRecover from errors.\n") print("\t-d\tUse \"delimiter\" in CSV. Default is \",\".\n") print("\t-n\tUse \"null\" as placeholder for empty values in CSV. Default is empty.\n") - print("\t-m MSG[.field1,field2,...]\n\t\tDump only messages of specified type, and only specified fields.\n\t\tMultiple -m options allowed.") + print("\t-m MSG[_field1,field2,...]\n\t\tDump only messages of specified type, and only specified fields.\n\t\tMultiple -m options allowed.") print("\t-t\tSpecify TIME message name to group data messages by time and significantly reduce duplicate output.\n") print("\t-fPrint to file instead of stdout") return