Fix bug in @property trigger_type concerning the instantiation of TriggerType#9
Fix bug in @property trigger_type concerning the instantiation of TriggerType#9b-destoop wants to merge 1 commit into
Conversation
Fix bug in @Property trigger_type that was raised when the oscilloscope did not return a capitalized value when reading the trigger type.
|
Hi @b-destoop, you still have "[WORK IN PROGRESS]" written at the top of your PR description. Thanks for your contribution. |
|
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. |
|
Hi @sibartel, we have decided not to pursue this implementation further. Sadly my contribution will remain this small. Kind regards. |
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 beEDGEin the example case.lecroyutils/src/lecroyutils/control.py
Lines 126 to 128 in 18a7026
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.