mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
Bugfix: corrects orientation of magnetometer raw values
The magnetomer raw values were not being rotated in the same direction as the scaled values. This meant that if the rotation was set to ROTATION_NONE, the raw values and scaled values were off by 180 degrees.
This commit is contained in:
committed by
Lorenz Meier
parent
07a995a621
commit
47d7465476
@@ -987,8 +987,8 @@ HMC5883::collect()
|
||||
* to align the sensor axes with the board, x and y need to be flipped
|
||||
* and y needs to be negated
|
||||
*/
|
||||
new_report.x_raw = report.y;
|
||||
new_report.y_raw = -report.x;
|
||||
new_report.x_raw = -report.y;
|
||||
new_report.y_raw = report.x;
|
||||
/* z remains z */
|
||||
new_report.z_raw = report.z;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user