From fc39d29910374b9a3c863f1d14de0b19658fc9db Mon Sep 17 00:00:00 2001 From: Sassa NF Date: Sat, 29 Mar 2025 08:56:29 +0000 Subject: [PATCH] Fixup compass --- lib/heading/Compass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/heading/Compass.cpp b/lib/heading/Compass.cpp index 8a86871..3f4b3db 100644 --- a/lib/heading/Compass.cpp +++ b/lib/heading/Compass.cpp @@ -147,7 +147,7 @@ int8_t _read_xyz(TwoWire &wire, CompassXYZ &xyz) int8_t r = _read_registers(wire, QMC5883_ADDR, 0, (uint8_t *)&mags, 6); xyz.x = mags[0]; xyz.y = mags[1]; - xyz.z = mags[1]; + xyz.z = mags[2]; return r; }