diff options
author | Kieran Cawthray <kieranc@gmail.com> | 2021-11-15 22:21:11 +0100 |
---|---|---|
committer | Kieran Cawthray <kieranc@gmail.com> | 2021-11-15 22:21:11 +0100 |
commit | 50406adc34bef1b5949660521891161e481b3965 (patch) | |
tree | 40ac61f401ae6e31d8fbc29f843f75c1a1120247 /src/drivers/Cst816s.cpp | |
parent | 5a0cf8e3485dee193a86e8929233ecddb6711a94 (diff) | |
parent | 624429b54c1819d58b69a2f74f5c852e1ecb0ed3 (diff) |
Merge remote-tracking branch 'upstream/develop' into pts-settings
Diffstat (limited to 'src/drivers/Cst816s.cpp')
-rw-r--r-- | src/drivers/Cst816s.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/drivers/Cst816s.cpp b/src/drivers/Cst816s.cpp index 4aac19f9..bf51a8ba 100644 --- a/src/drivers/Cst816s.cpp +++ b/src/drivers/Cst816s.cpp @@ -32,17 +32,11 @@ bool Cst816S::Init() { twiMaster.Read(twiAddress, 0xa7, &dummy, 1); vTaskDelay(5); - static constexpr uint8_t maxRetries = 3; - bool isDeviceOk; - uint8_t retries = 0; - do { - isDeviceOk = CheckDeviceIds(); - retries++; - } while (!isDeviceOk && retries < maxRetries); - - if (!isDeviceOk) { - return false; - } + // TODO This function check that the device IDs from the controller are equal to the ones + // we expect. However, it seems to return false positive (probably in case of communication issue). + // Also, it seems that some users have pinetimes that works correctly but that report different device IDs + // Until we know more about this, we'll just read the IDs but not take any action in case they are not 'valid' + CheckDeviceIds(); /* [2] EnConLR - Continuous operation can slide around |