]> sigrok.org Git - libsigrokdecode.git/commit - decoders/usb_power_delivery/pd.py
usb_power_delivery: enforce numerical order of RDO/PDO flag annotations
authorGerhard Sittig <redacted>
Fri, 22 Dec 2017 17:33:58 +0000 (18:33 +0100)
committerGerhard Sittig <redacted>
Fri, 22 Dec 2017 17:57:14 +0000 (18:57 +0100)
commit57ba804a912c0753aefcaf8eee2f19ad7f5e86e5
tree4c6e9f872d1aa9228f57bf713b7d06395e3c944b
parent10aeb8ea8b183394cebc0033f048f49f4262b57d
usb_power_delivery: enforce numerical order of RDO/PDO flag annotations

Annotations of the USB power delivery decoder contain multiple text
fragments that correspond to several flags in bit fields. The Python
runtime did not guarantee an order of emission and made the test suite
fail.

Sort the order in which RDO and PDO flags related text fragments get
constructed and concatenated. Print text for higher bit positions first
as this might feel more intuitive to users.

This fixes part of bug #1090.
decoders/usb_power_delivery/pd.py