Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capsules: chirp_i2c_moisture: Improve reliability and accuracy
To ensure that we always get the capacitance we issue the GET_CAPACITANCE command twice. The first to start a fresh request and the second to get the latest value. Previously we missed the second request as it was just a read operation instead of a write/read with the second GET_CAPACITANCE request. This returned out of date data. Fix this by issueing two GET_CAPACITANCE requests. While here let's convert the data processing to return a percentage of moisture (from air to full water) instead of returning the dry basis moisture content. Signed-off-by: Alistair Francis <[email protected]>
- Loading branch information