From 6bc7d257f03977b47eff22285d459011a4c50be7 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 2 Sep 2024 12:28:28 +0200 Subject: [PATCH] Add alternative 0xecaa ID Some sensors mounted on Plug And Play kit are reporting 0xecaa as ID (may be a new silicon revision not tracked by the datasheet?) The issue was not discovered before https://github.com/stm32duino/VL53L4CD/commit/d2c29d592c53898bf8fac64b71a76dab98840a69 got merged, since the check was succeeded in any case. --- src/vl53l4cd_class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vl53l4cd_class.h b/src/vl53l4cd_class.h index ab04f4b..ef98396 100644 --- a/src/vl53l4cd_class.h +++ b/src/vl53l4cd_class.h @@ -130,7 +130,7 @@ class VL53L4CD { status = VL53L4CD_GetSensorId(&sensor_id); - if (status != VL53L4CD_ERROR_NONE || (sensor_id != 0xebaa)) { + if (status != VL53L4CD_ERROR_NONE || ((sensor_id != 0xebaa) && (sensor_id != 0xecaa))) { return VL53L4CD_ERROR_TIMEOUT; }