Closed rnestler closed 3 years ago
As a separate commit or PR, could you also double-check whether the sensor indeed returns correctly checksummed 0xff readings outside the data-ready window?
This is indeed the case. Depending on the clock deviation between the SCD30 and the Raspberry Pi it happens more or less frequently.
After testing it extensively on a RaspberryPi I came to the following conclusion:
SCD30_DATA_READY_WINDOW_US
doesn't seem to exist anymoreI'll change this PR accordingly.
If the sensirion_sleep_usec sleeps longer or shorter, the readout will fail at some point, since we will miss the readout window of 100ms at one point or another. By waiting less then the measurement interval and then starting to poll the data ready flag we should fix the issue, except if the sleep time is off by more than 100ms.
Fixes #43
Check the following:
make style-fix
)