]> sigrok.org Git - libsigrokdecode.git/commitdiff
jtag_ejtag: Fix short/long annotation order.
authorUwe Hermann <redacted>
Thu, 21 Jun 2018 20:09:55 +0000 (22:09 +0200)
committerUwe Hermann <redacted>
Fri, 22 Jun 2018 10:10:52 +0000 (12:10 +0200)
The list of annotation strings is sorted from longest to shortest.

decoders/jtag_ejtag/pd.py

index 9dc443826c67dabe2db8d963fe098aad19710bc3..80888edeaabb8d422651e2416a89b54f844d9413 100644 (file)
@@ -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)