ppannuto / python-saleae

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

Additional investigations of the export process #35

Closed rpolitex closed 7 years ago

rpolitex commented 7 years ago

I made an additional investigation of the export process and here is my results. The main conclusion is - we should take into account what channels are Active and what channels are asked to Export. Only this way we can choose the right combination of options.

NOTE: Tested only on my Saleae Logic Pro 8 with 1.2.12 software version.

export_data2() results relative to enabled and exported channels

Enabled channels Exported channels Correct command
Analog Analog ' ' (None)
Digital Wrong combination
Both Wrong combination
Digital Analog Wrong combination
Digital ' ' (None)
Both Wrong combination
Both Analog ANALOG_ONLY (ANALOG_AND_DIGITAL also works)
Digital DIGITAL_ONLY
Both ANALOG_AND_DIGITAL

Examples

Analog enabled and analog exported:

s.set_active_channels([], [2, 3])
s.export_data2(filename, digital_channels=None, analog_channels=[3])

Digital enabled and digital exported:

s.set_active_channels([0, 1], [])
s.export_data2(filename, digital_channels=[0], analog_channels=None)

Both enabled

s.set_active_channels([0, 1], [2, 3])

and:

ppannuto commented 7 years ago

Nice work! Thanks for going through the effort to enumerate all of these cases