ArduPilot / pymavlink

python MAVLink interface and utilities
Other
480 stars 586 forks source link

mavparmdiff: use_tabs ignored for parameters not present in both files #796

Open durka opened 1 year ago

durka commented 1 year ago

If you run mavparmdiff.py with -t to use tabs as separators, it works as expected when a parameter differs between files, however, spaces are still used for parameters that are only in one of the two files.

$ mavparmdiff -t file1.params file2.params | cat -T
[...]
ADSB_ENABLE            0.0000
ADSB_TYPE                           0.0000
AHRS_TRIM_X^I-0.0135^I-0.0512
[...]

As my plan was to use -t and then import the result into a spreadsheet program, this is not helpful as it can't parse the first two lines.

In my opinion, the output should have been (note two tabs in the second line):

ADSB_ENABLE^I0.0000
ADSB_TYPE^I^I0.0000
AHRS_TRIM_X^I-0.0135^I-0.0512
durka commented 1 year ago

I'll submit an MR unless this is expected behavior?