/* Helper function for calculating accelerometer ranges. Considers the current full-scale register config (i.e. +/-2g, +/-4g, etc...)  */
static void icm42688_emul_get_accel_ranges(const struct emul *target, q31_t *lower, q31_t *upper, q31_t *epsilon, int8_t *shift)
/* Helper function for calculating accelerometer ranges. Considers the current full-scale register config (i.e. +/-2g, +/-4g, etc...)  */
static void icm42688_emul_get_accel_ranges(const struct emul *target, q31_t *lower, q31_t *upper, q31_t *epsilon, int8_t *shift)
{
	int fs_g;
	int sensitivity;
	icm42688_emul_get_accel_settings(target, &fs_g, &sensitivity, shift);
	*epsilon = (3 * SENSOR_G * Q31_SCALE / sensitivity / 1000000LL / 2) >> *shift;
	*upper = (fs_g * SENSOR_G * Q31_SCALE / 1000000LL) >> *shift;
	*lower = -*upper;
}