mirror of https://github.com/ArduPilot/ardupilot
Tools: fix decode_watchdog display of LR,FA and FICSR
This commit is contained in:
parent
069b7142b7
commit
3035f8dea3
|
@ -247,6 +247,10 @@ class DecodeWatchDog(object):
|
||||||
continue
|
continue
|
||||||
value = value.strip()
|
value = value.strip()
|
||||||
# print("(%s)=(%s)" % (name, value))
|
# print("(%s)=(%s)" % (name, value))
|
||||||
|
if name in ["LR", "FICSR", "FA"]:
|
||||||
|
value = int(value, 10)
|
||||||
|
value = hex(value)
|
||||||
|
value = value[2:]
|
||||||
if name not in self.df_components:
|
if name not in self.df_components:
|
||||||
raise KeyError(name)
|
raise KeyError(name)
|
||||||
self.df_components[name](value).print_decoded()
|
self.df_components[name](value).print_decoded()
|
||||||
|
@ -266,7 +270,7 @@ class DecodeWatchDog(object):
|
||||||
continue
|
continue
|
||||||
value = m.group(i+1)
|
value = m.group(i+1)
|
||||||
# convert some things from base10 to hex:
|
# convert some things from base10 to hex:
|
||||||
if name in ["LR", "FICSR"]:
|
if name in ["LR", "FICSR", "FA"]:
|
||||||
value = int(value, 10)
|
value = int(value, 10)
|
||||||
value = hex(value)
|
value = hex(value)
|
||||||
value = value[2:]
|
value = value[2:]
|
||||||
|
|
Loading…
Reference in New Issue