]> sigrok.org Git - libsigrok.git/commit - src/hardware/kingst-la2016/protocol.h
kingst-la2016: implement alternative simpler threshold voltage config
authorGerhard Sittig <redacted>
Mon, 31 Jan 2022 17:41:55 +0000 (18:41 +0100)
committerGerhard Sittig <redacted>
Sun, 6 Feb 2022 17:53:54 +0000 (18:53 +0100)
commit9270f8f437581605ab4e3e808e2bd62f41ab7d35
tree6e0e0a01b0ec289a4e16e6aa048a087b84a7e686
parentc35baf6eb0b0b2bc7b1240809775eca1927ca199
kingst-la2016: implement alternative simpler threshold voltage config

The complex setup with three config keys that heavily interact with each
other did not work from the user's perspective. It's unfortunate how the
configuration of one item changed another item's value. The GUI would
not provide labels which reflect the currently configured voltage value,
the list of presets was never presented in the GUI.

Implement something that is both simpler and works with sigrok-cli as
well as pulseview. Reduce the set of choices and only provide a discrete
list of voltages. Yet try to cover most logic families and typical use
cases. This alternative approach exists in addition to the previously
implemented approach, and is selected by compile time switches. Ideally
the logic input threshold voltage would be a property of the "Logic"
channel group, but the GUI then won't display the option. That's why it
currently remains a global device option.

Pass the user specified voltage as a value from api.c to protocol.c
which eliminates intimate knowledge of the config API's internal details
(especially with the compile time options in api.c).
src/hardware/kingst-la2016/api.c
src/hardware/kingst-la2016/protocol.c
src/hardware/kingst-la2016/protocol.h