Skip to content

Conversation

@rpolitex
Copy link
Contributor

@rpolitex rpolitex commented Jul 8, 2017

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:

  • analog exported:

    s.export_data2(filename, digital_channels=None, analog_channels=[3])
  • digital exported:

    s.export_data2(filename, digital_channels=[0], analog_channels=None)
  • both exported

    s.export_data2(filename, digital_channels=[0], analog_channels=[3])

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:
```python
s.set_active_channels([], [2, 3])
s.export_data2(filename, digital_channels=None, analog_channels=[3])
```
**Digital** enabled and **digital** exported:
```python
s.set_active_channels([0, 1], [])
s.export_data2(filename, digital_channels=[0], analog_channels=None)
```

**Both** enabled
```python
s.set_active_channels([0, 1], [2, 3])
```
and:
- **analog** exported:
  ```python
  s.export_data2(filename, digital_channels=None, analog_channels=[3])
  ```

- **digital** exported:

  ```python
  s.export_data2(filename, digital_channels=[0], analog_channels=None)
  ```

- **both** exported
  ``` python
  s.export_data2(filename, digital_channels=[0], analog_channels=[3])
  ```
@ppannuto
Copy link
Owner

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

@ppannuto ppannuto merged commit b3e1556 into ppannuto:master Jul 14, 2017
ppannuto added a commit that referenced this pull request Feb 9, 2018
 - #30: Fix path formatting, thanks @roel0
 - #34, #35: Improvements to data exporting, thanks @rpolitex
 - #36: Alternate Logic path on Windows, thanks @hexfet
 - #39: Fix spawning of Logic on Linux, thanks @johnthagen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants