From: Uwe Hermann Date: Thu, 21 Jun 2018 20:09:55 +0000 (+0200) Subject: jtag_ejtag: Fix short/long annotation order. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=068960b63ae6eca1392561fde5efac09e846251c;p=libsigrokdecode.git jtag_ejtag: Fix short/long annotation order. The list of annotation strings is sorted from longest to shortest. --- diff --git a/decoders/jtag_ejtag/pd.py b/decoders/jtag_ejtag/pd.py index 9dc4438..80888ed 100644 --- a/decoders/jtag_ejtag/pd.py +++ b/decoders/jtag_ejtag/pd.py @@ -292,7 +292,7 @@ class Decoder(srd.Decoder): short_desc = comment + ': ' + value_str long_desc = value_descriptions[value_index] if len(value_descriptions) > value_index else '?' - display_data = [ann, [short_desc, long_desc]] + display_data = [ann, [long_desc, short_desc]] self.put_at(ss, es, display_data) @@ -366,7 +366,7 @@ class Decoder(srd.Decoder): s_short = insn[0] s_long = insn[0] + ': ' + insn[1] + ' (' + hex + ')' # Display it and select data register. - self.put_current([Ann.INSTRUCTION, [s_short, s_long]]) + self.put_current([Ann.INSTRUCTION, [s_long, s_short]]) else: self.put_current([Ann.INSTRUCTION, [hex, 'IR TDI ({})'.format(hex)]]) self.select_reg(code)