CST816S : read device id but do not disable the device if they are not correct.
This commit is contained in:
parent
cbcae2ec54
commit
9256f24663
|
@ -32,7 +32,7 @@ bool Cst816S::Init() {
|
||||||
twiMaster.Read(twiAddress, 0xa7, &dummy, 1);
|
twiMaster.Read(twiAddress, 0xa7, &dummy, 1);
|
||||||
vTaskDelay(5);
|
vTaskDelay(5);
|
||||||
|
|
||||||
/*
|
|
||||||
static constexpr uint8_t maxRetries = 3;
|
static constexpr uint8_t maxRetries = 3;
|
||||||
bool isDeviceOk;
|
bool isDeviceOk;
|
||||||
uint8_t retries = 0;
|
uint8_t retries = 0;
|
||||||
|
@ -40,7 +40,7 @@ bool Cst816S::Init() {
|
||||||
isDeviceOk = CheckDeviceIds();
|
isDeviceOk = CheckDeviceIds();
|
||||||
retries++;
|
retries++;
|
||||||
} while (!isDeviceOk && retries < maxRetries);
|
} while (!isDeviceOk && retries < maxRetries);
|
||||||
|
/*
|
||||||
if (!isDeviceOk) {
|
if (!isDeviceOk) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue