Skip to content

Commit

Permalink
Merge branch 'develop' of JF/PineTime into master
Browse files Browse the repository at this point in the history
  • Loading branch information
JF002 authored and Gitea committed Nov 15, 2021
2 parents f6d0ec4 + 624429b commit cfef013
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(pinetime VERSION 1.7.0 LANGUAGES C CXX ASM)
project(pinetime VERSION 1.7.1 LANGUAGES C CXX ASM)

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
Expand Down
16 changes: 5 additions & 11 deletions src/drivers/Cst816s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cfef013

Please sign in to comment.