[Python API] Channel naming

Just wanted to add another vote for implementing this feature. Same use case as described above - a capture without channel labels that correspond to the net names is challenging to analyze (or at least requires more steps to get there).

FYI –

If you check out the sal_rename_channels() function in the github repo linked above, I think you could merge it in your automation script as a work around, pending Saleae adding native support for channel renames to the API directly.

Thus, I think you could do something like this (modified snippet from the Saleae automation API example):

# Finally, save the capture to a file
        capture_filepath = os.path.join(output_dir, 'example_capture.sal')
        capture.save_capture(filepath=capture_filepath)

# Rename ch0, ch1 and ch2 in saved capture
        new_filepath = os.path.join(output_dir, 'example_capture_renamed.sal')
        sal_rename_channels(capture_filepath, new_filepath, new_ch0="MISO", new_ch1="Clock", new_ch2="Enable")

Note: I wasn’t sure about community interest in expanding this script, so I haven’t done much with it since first posted. Anyone using it and finding it useful? For me, it was just a practical little exercise to learn some python.