If several threads attempt to query the device, only one query at a time
should be performed, until receiving the answer. Otherwise, mixup
between the answers can cause incorrect value reading.
=> use thread lock.
Also handle error reading specifically, as the format is quite peculiar,
to automatically detect such synchronization error and attempt to
re-synchronize.
If several threads attempt to query the device, only one query at a time should be performed, until receiving the answer. Otherwise, mixup between the answers can cause incorrect value reading. => use thread lock.
Also handle error reading specifically, as the format is quite peculiar, to automatically detect such synchronization error and attempt to re-synchronize.
Also fix some minor issues.