treat as changed if range not valid

This commit is contained in:
interfisch 2022-11-13 11:16:30 +01:00
parent 0ea531bd36
commit 8109f46153
1 changed files with 2 additions and 2 deletions

View File

@ -69,9 +69,9 @@ void Sensor_VL53L1X::sensorloop()
*/
//&& VL53L1X::rangeStatusToString(vl53l1x->ranging_data.range_status)=="range valid"
if (abs((int)d.lastsentvalue-d.value)>=d.minchange ){ //int abs
if (vl53l1x->ranging_data.range_status==0) { // "0 is range valid"
//if (vl53l1x->ranging_data.range_status==0) { // "0 is range valid"
_changed=true;
}
//}
}
/*if (lastsentvalue_vl53l1x_status!=vl53l1x->ranging_data.range_status) { //sensor status changed
_changed=true;