We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ca4066 commit 2b7e1edCopy full SHA for 2b7e1ed
src/components/i2c/drivers/WipperSnapper_I2C_Driver_VL53L4CX.h
@@ -142,11 +142,14 @@ class WipperSnapper_I2C_Driver_VL53L4CX : public WipperSnapper_I2C_Driver {
142
int no_of_object_found = pMultiRangingData->NumberOfObjectsFound;
143
if (no_of_object_found - 1 < index) {
144
WS_DEBUG_PRINT("Object not found at index #");
145
- WS_DEBUG_PRINTLN(index);
146
- return false;
+ WS_DEBUG_PRINT(index);
+ WS_DEBUG_PRINTLN(", returning NaN");
147
+ proximityEvent->data[0] = NAN;
148
+ return true;
149
}
150
bool retVal = updateDataPointIfValid(pMultiRangingData->RangeData[index],
151
proximityEvent);
152
+ return retVal;
153
} else {
154
WS_DEBUG_PRINT("VL53L4CX Error: ");
155
WS_DEBUG_PRINTLN(status);
0 commit comments