nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ sensor_value_abs_difference()

static struct sensor_value sensor_value_abs_difference ( struct sensor_value sensor_val1,
struct sensor_value sensor_val2 )
inlinestatic

#include <include/caf/caf_sensor_common.h>

Helper function for calculating absolute value of difference of two sensor_values.

Parameters
sensor_val1First sensor value.
sensor_val2Second sensor value.
Returns
Absolute value of difference between sensor_val1 and sensor_val2.