mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-19 00:00:34 +08: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
@@ -207,8 +207,14 @@ void Magnetometer::ParametersUpdate()
|
||||
|
||||
void Magnetometer::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.setIdentity();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user