liquidctl/liquidctl/driver
Jonas Malaco fd4ccd70d0 Only explicitly clear already enqueued HID reports
Commit 2050d0b ("Traverse all hid/hidraw queued reports and return the
last one") aggressively started to clear all enqueued reports whenever a
read was done on a HID using hidapi.

While that seemed to work ok, it could cause important reports to be
lost, which might eventually break some drivers.  As no contributor has
enough devices to test all drivers, it is better to be conservative and
only explicitly clear enqueued reports.

Notably, it is wiser to clear the queue before any writes that precede
one or more reads.  This will clear stale data that has already been
queued, but will not risk loosing expected responses.  And drivers that
expect reads to match specific writes should already be prepared to
handle what is left.

The objective is not definitively clear all previous reports, but simply
to avoid acting on (or forwarding to the user) stale data.  The subtle
difference is that _stale_ presumes a delay of more than infinitesimal
length.

Related: #87 ("1.3.2 regression: kraken_two.get_status() returns wrong
fan RPM value")
2020-02-18 02:22:43 -03:00
..
__init__.py Reword file description for copyright notice 2019-11-03 00:37:00 -03:00
asetek.py Switch to a managed key-value storage and conform to XDG basedir spec 2019-11-14 18:58:49 -03:00
base.py Allow initialize methods to optionally return status tuples 2019-11-08 10:06:16 -03:00
corsair_hid_psu.py Only explicitly clear already enqueued HID reports 2020-02-18 02:22:43 -03:00
kraken_two.py Only explicitly clear already enqueued HID reports 2020-02-18 02:22:43 -03:00
nzxt_smart_device.py Only explicitly clear already enqueued HID reports 2020-02-18 02:22:43 -03:00
seasonic.py Only explicitly clear already enqueued HID reports 2020-02-18 02:22:43 -03:00
usb.py Only explicitly clear already enqueued HID reports 2020-02-18 02:22:43 -03:00