ppannuto / python-saleae

Python library to control a Saleae Logic Analyzer
Apache License 2.0
124 stars 55 forks source link

Error reading time_span #41

Closed anujpotnis closed 6 years ago

anujpotnis commented 6 years ago

File: python-saleae/saleae/saleae.py

It appears that there is a bug in the function _exportdata2. For start time and end time you want to use first and second element of array _timespan.

elif len(time_span) == 2:
   self._build(['TIME_SPAN', '{0:f}'.format(time_span[0]), '{0:f}'.format(time_span[0])])

I think it should be:

elif len(time_span) == 2:
   self._build(['TIME_SPAN', '{0:f}'.format(time_span[0]), '{0:f}'.format(time_span[1])])