]> sigrok.org Git - libsigrokdecode.git/commit
graycode, morse, pwm, usb_request, wiegand: cope with absent sample rate
authorGerhard Sittig <redacted>
Sun, 28 Jan 2018 19:49:48 +0000 (20:49 +0100)
committerGerhard Sittig <redacted>
Sun, 28 Jan 2018 19:49:48 +0000 (20:49 +0100)
commit15a8a05595c72d328abdea8e3b23f1b558cc46bf
treedf65ff2c6163724aa5f49275086963fa3660b6a5
parent956721de58552b05776c8613449f2907196e61e9
graycode, morse, pwm, usb_request, wiegand: cope with absent sample rate

Improve robustness of some more protocol decoders. Few of them never
checked for the availability of a sample rate in the first place, others
checked for the presence of a spec but would not cope with a value of 0.
Some checked the value only after processing it, which could result in
runtime errors.

This change is motivated by bug #1118.
decoders/graycode/pd.py
decoders/morse/pd.py
decoders/pwm/pd.py
decoders/usb_request/pd.py
decoders/wiegand/pd.py