ppannuto / python-saleae

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

Support for positive/negative pulse triggers added #43

Closed Renegade85 closed 3 years ago

Renegade85 commented 5 years ago

Hi Pat,

After all, I've reworked the concept a bit than we have discussed.

For users the interface should be the same and provides backward compatibility. Trigger class has been renamed to TriggerType class. This is used as an input for a new Trigger class. In case of triggers which require more arguments for setup, **kwargs were added.

Example:

trigger1 = Trigger(0) # or Trigger(TriggerType.NoTrigger)

trigger2 = Trigger(5) # or Trigger(TriggerType.Pospulse); min and max width are set to default values 0.1
trigger3 = Trigger(6, minimum_pulse_width=1, maximum_pulse_width=2)

Have a nice day, Renegade

ppannuto commented 3 years ago

Ageing this out. If someone wants to pick this up at some point, feel free to re-open with updates.