ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
Typedefs | |
typedef void(* | rd_test_print_fp) (const char *const msg) |
function pointer to print test information More... | |
Functions | |
bool | rd_expect_close (const float expect, const int8_t precision, const float check) |
Check if given value is "near enough" to what user expects. More... | |
Functions to test drivers.
typedef void(* rd_test_print_fp) (const char *const msg) |
function pointer to print test information
Definition at line 23 of file ruuvi_driver_test.h.
bool rd_expect_close | ( | const float | expect, |
const int8_t | precision, | ||
const float | check | ||
) |
Check if given value is "near enough" to what user expects.
Check if two floats are close to another, down to precision. Example
[in] | expect | Expected value. |
[in] | precision | Number of decimals which must match. Negative values are allowed. |
[in] | check | Value to check. |