pymavlink icon indicating copy to clipboard operation
pymavlink copied to clipboard

string issues

Open tridge opened this issue 3 years ago • 5 comments

issues from the recent changes to string handling:

mavparmdiff.py using b'XXXX' image

NAMED_VALUE_FLOAT string indexes show as b'XXXX' image

tridge avatar Nov 03 '22 04:11 tridge

ping @alehed

tridge avatar Nov 03 '22 04:11 tridge

@alehed here are two param files that show the mavparmdiff.py issue 5.txt 6.txt just run mavparmdiff.py 5.txt 6.txt

tridge avatar Nov 03 '22 04:11 tridge

so 6.txt has the bad string conversions in it, we somehow ended up with both forms in the param file:

SR0_ADSB         4
SR0_EXTRA1       4
SR0_EXTRA2       4
SR0_EXTRA3       4
SR0_EXT_STAT     4
SR0_PARAMS       10
SR0_POSITION     4
SR0_RAW_CTRL     4
SR0_RAW_SENS     4
SR0_RC_CHAN      4
b'SR0_ADSB'      1.000000
b'SR0_EXTRA1'    1.000000
b'SR0_EXTRA2'    1.000000
b'SR0_EXTRA3'    1.000000
b'SR0_EXT_STAT'  1.000000
b'SR0_POSITION'  1.000000
b'SR0_RAW_CTRL'  1.000000
b'SR0_RAW_SENS'  1.000000
b'SR0_RC_CHAN'   1.000000

ahh, reproduced. Set param_ftp=0 and fetch params, end up with both forms

tridge avatar Nov 03 '22 06:11 tridge

setting parameters with mavproxy is also failing, I think what is happening is the PARAM_VALUE reply is not being recognised due to string mis-match between the two forms

tridge avatar Nov 03 '22 06:11 tridge

fixes here: https://github.com/ArduPilot/MAVProxy/pull/1117 https://github.com/ArduPilot/pymavlink/pull/746

tridge avatar Nov 03 '22 07:11 tridge