diff --git a/MAVProxy/modules/lib/msgstats.py b/MAVProxy/modules/lib/msgstats.py index c9cb3d0c83..3518123735 100644 --- a/MAVProxy/modules/lib/msgstats.py +++ b/MAVProxy/modules/lib/msgstats.py @@ -87,7 +87,15 @@ def show_stats(mlog): pairs = sorted(pairs, key = lambda p : p[1]) for (name,size) in pairs: if size > 0: - print("%-*s %.2f%%" % (maxnamelen, name, 100.0 * size / total_size)) + descstr = '' + if hasattr(mlog,'metadata'): + desc = mlog.metadata.get_description(name) + if desc: + if len(desc) > 65: + descstr = " [%s...]" % desc[:62] + else: + descstr = " [%s]" % desc + print("%-*s %.2f%%%s" % (maxnamelen, name, 100.0 * size / total_size, descstr)) print("") category_total = 0