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

◆ ext_sensors_accelerometer_threshold_set()

int ext_sensors_accelerometer_threshold_set ( double  threshold,
bool  upper 
)

#include <applications/asset_tracker_v2/src/ext_sensors/ext_sensors.h>

Set the threshold that triggers callback on accelerometer data.

Parameters
[in]thresholdVariable that sets the accelerometer threshold value in m/s2. Must be a value larger than 0 and smaller than the configured range (default 2G: ~= 19.6133 m/s2).
[in]upperFlag indicating if the given threshold is for activity detection (true) or inactivity detection (false).
Returns
0 on success or negative error value on failure.