-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
| while (dataAvailable(fd) == 0) delay(POLLING_DELAY); //Potential TODO: avoid this to get faster nearly parralel mesurments |
A defective sensor appears to not change its state. Use this Hotfix to prevent the software from stopping completely
int i = 0;
while (dataAvailable(fd) == 0){
if(i < TIMEOUT_COUNTER){
printf("Measurement at sensor timeout do not trust that received data is new");
break;
}
delay(POLLING_DELAY); //Potential TODO: avoid this to get faster nearly parralel mesurments
i++;
}
Attantion dataAvailable is a register on the sensor that indicates that the measurement is finished and ready to be read from the sensor.
Not waiting for this may result in old data being read.
Metadata
Metadata
Assignees
Labels
No labels