mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
sensor_calibration: respect board rotation even if uncalibrated
- fixes https://github.com/PX4/PX4-Autopilot/issues/16873
This commit is contained in:
committed by
Mathieu Bresciani
parent
e2563388eb
commit
69bd3ecf95
@@ -220,8 +220,14 @@ void Accelerometer::ParametersUpdate()
|
||||
|
||||
void Accelerometer::Reset()
|
||||
{
|
||||
_rotation.setIdentity();
|
||||
_rotation_enum = ROTATION_NONE;
|
||||
if (_external) {
|
||||
set_rotation(ROTATION_NONE);
|
||||
|
||||
} else {
|
||||
// internal sensors follow board rotation
|
||||
set_rotation(GetBoardRotation());
|
||||
}
|
||||
|
||||
_offset.zero();
|
||||
_scale = Vector3f{1.f, 1.f, 1.f};
|
||||
_thermal_offset.zero();
|
||||
|
||||
Reference in New Issue
Block a user