![]() |
nRF Connect SDK API 3.3.99
|
| int accel_to_angle_state_clean | ( | struct accel_to_angle_ctx * | ctx | ) |
#include <include/accel_to_angle/accel_to_angle.h>
Clean the internal state of the context instance.
If the threshold is exceeded, the function resets the cumulative difference in the context, and the angle difference starts accumulating again from zero.
This function also calls the accel_to_angle_filter::data_clean_request callback if it is set in the context.
The function can be used to reinitialize the state of rotation change detection.
| [in] | ctx | Pointer to the accel_to_angle_ctx context. |
| 0 | If the operation was successful. Otherwise, a (negative) error code is returned. |