diff options
Diffstat (limited to 'decoders/usb_request/pd.py')
-rw-r--r-- | decoders/usb_request/pd.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/decoders/usb_request/pd.py b/decoders/usb_request/pd.py index a480284..e77debc 100644 --- a/decoders/usb_request/pd.py +++ b/decoders/usb_request/pd.py @@ -171,7 +171,8 @@ class Decoder(srd.Decoder): def metadata(self, key, value): if key == srd.SRD_CONF_SAMPLERATE: self.samplerate = value - self.secs_per_sample = float(1) / float(self.samplerate) + if self.samplerate: + self.secs_per_sample = float(1) / float(self.samplerate) def start(self): self.out_binary = self.register(srd.OUTPUT_BINARY) |