13 bool ri_expect_close (
const float expect,
const int8_t precision,
16 if (!isfinite (expect) || !isfinite (check)) {
return false; }
18 const float max_delta = pow (10, precision);
19 float delta = expect - check;
21 if (delta < 0) { delta = 0 - delta; }
23 return max_delta > delta;
Header to enable and disable module compilation.
Ruuvi error codes and error check function.
Functions for testing drivers.