Skip to content

Conversation

@b-destoop
Copy link

@b-destoop b-destoop commented Sep 9, 2025

Problem

I am using a LeCroy Waverunner 104Xi-A. When reading the trigger type, it returns a single word with capitalized first letter, e.g.: Edge. The code below expects a fully capitalized single word, which would be EDGE in the example case.

@property
def trigger_type(self) -> TriggerType:
return TriggerType(self._read('app.Acquisition.Trigger.Type'))

Solution

I have made the instantiation more general by adding the call to str.upper() to the request. This change does not break compatibility with other hardware, while including compatibility with slightly different implementations of the firmware.

 @property 
 def trigger_type(self) -> TriggerType: 
     return TriggerType(self._read('app.Acquisition.Trigger.Type'.upper())) 

Fix bug in @Property trigger_type that was raised when the oscilloscope
did not return a capitalized value when reading the trigger type.
@sibartel
Copy link
Owner

Hi @b-destoop,

you still have "[WORK IN PROGRESS]" written at the top of your PR description.
For me it looks quite complete. So let me know when I can merge it. :)

Thanks for your contribution.

@b-destoop
Copy link
Author

Hi @sibartel,

I tagged it as work in progress because I ran into some other issues where the code was not compatible with my rather old scope. The problem lies in the Qualify trigger mode. My 104Xi-A is answering with the string "QUALIFY", while the code expects the word "QUALIFIED".

The reason for the WIP tag is that I expect more of these intricacies to pop up, which I can then merge in a single request.

@b-destoop
Copy link
Author

Hi @sibartel,

we have decided not to pursue this implementation further. Sadly my contribution will remain this small.
You can merge this pull request if desired.

Kind regards.

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.

3 participants