Skip to content

Commit a7b7ddc

Browse files
committed
ModulinoDistance: wrap isnan() check in helper API
1 parent 7791e03 commit a7b7ddc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Modulino.h

+3
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ class ModulinoDistance : public Module {
418418
return NAN;
419419
}
420420
}
421+
bool isValid(float distance) {
422+
return !isnan(distance);
423+
}
421424
private:
422425
VL53L4CD* tof_sensor = nullptr;
423426
VL53L4CD_Result_t results;

0 commit comments

Comments
 (0)