mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 23:33:33 +08:00
stop manually defining physical constants
This commit is contained in:
committed by
Lorenz Meier
parent
7538ea44e3
commit
d75fd72c02
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <ecl/geo/geo.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
@@ -575,7 +576,7 @@ BMA180::set_range(unsigned max_g)
|
||||
}
|
||||
|
||||
/* set new range scaling factor */
|
||||
_accel_range_m_s2 = _current_range * 9.80665f;
|
||||
_accel_range_m_s2 = _current_range * CONSTANTS_ONE_G;
|
||||
_accel_range_scale = _accel_range_m_s2 / 8192.0f;
|
||||
|
||||
/* enable writing to chip config */
|
||||
|
||||
Reference in New Issue
Block a user