summaryrefslogtreecommitdiff
path: root/include/accelgyro.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/accelgyro.h')
-rw-r--r--include/accelgyro.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h
index 2d415621d1..71127e46bd 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -152,6 +152,9 @@ struct accelgyro_saved_data_t {
uint16_t scale[3];
};
+#define SENSOR_APPLY_DIV_SCALE(_input, _scale) \
+ (((_input) * (uint64_t)MOTION_SENSE_DEFAULT_SCALE) / (_scale))
+
#define SENSOR_APPLY_SCALE(_input, _scale) \
(((_input) * (_scale)) / MOTION_SENSE_DEFAULT_SCALE)