Commit b429e956 authored by Louckas's avatar Louckas

[FEA]vl53l1x: Added return of error to all the get message in case of I2C AF

parent 5237fbe2
......@@ -407,6 +407,11 @@ VL53l1x::VL53L1Status VL53l1x::getDistance(uint16_t &distance)
return VL53L1Status::Received;
}
if (distanceStatus == MsgStatus::timedOut)
{
return VL53L1Status::Error;
}
return VL53L1Status::Waiting;
}
......@@ -432,6 +437,12 @@ VL53l1x::VL53L1Status VL53l1x::getRangeStatus(uint8_t &status)
return VL53L1Status::Received;
}
if (rangeStatus == MsgStatus::timedOut)
{
return VL53L1Status::Error;
}
return VL53L1Status::Waiting;
// VL53L1X_ERROR status = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment