]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/usb_power_delivery/pd.py
usb_power_delivery: wait 1ms instead of 100k samples
[libsigrokdecode.git] / decoders / usb_power_delivery / pd.py
index d6818c116fbd681099964e9b1c56912c1880a8ad..58e4e1722711c3a62144265fae4e9ee366bbad83 100644 (file)
@@ -201,10 +201,10 @@ class Decoder(srd.Decoder):
     inputs = ['logic']
     outputs = ['usb_pd']
     channels = (
     inputs = ['logic']
     outputs = ['usb_pd']
     channels = (
-        {'id': 'cc1', 'name': 'CC1', 'desc': 'Control channel 1'},
+        {'id': 'cc1', 'name': 'CC1', 'desc': 'Configuration Channel 1'},
     )
     optional_channels = (
     )
     optional_channels = (
-        {'id': 'cc2', 'name': 'CC2', 'desc': 'Control channel 2'},
+        {'id': 'cc2', 'name': 'CC2', 'desc': 'Configuration Channel 2'},
     )
     options = (
         {'id': 'fulltext', 'desc': 'full text decoding of the packet',
     )
     options = (
         {'id': 'fulltext', 'desc': 'full text decoding of the packet',
@@ -545,8 +545,7 @@ class Decoder(srd.Decoder):
         if not self.samplerate:
             raise SamplerateError('Cannot decode without samplerate.')
         while True:
         if not self.samplerate:
             raise SamplerateError('Cannot decode without samplerate.')
         while True:
-            pins = self.wait([{0: 'e'}, {1: 'e'}, {'skip': 100*1000}])
-
+            pins = self.wait([{0: 'e'}, {1: 'e'}, {'skip': int(self.samplerate/1e3)}])
 
             # First sample of the packet, just record the start date
             if not self.startsample:
 
             # First sample of the packet, just record the start date
             if not self.startsample: