From 43955b8c2ea3b0bc6b40da7ac69910974f865637 Mon Sep 17 00:00:00 2001 From: Shaun Date: Sat, 22 Nov 2025 16:36:49 -0800 Subject: [PATCH] Update SparkFun_TMAG5273_Arduino_Library.cpp There's a bug where if the mag is reset and any of these fields have changed, the init function locks. This adds the POR values for these two fields. --- src/SparkFun_TMAG5273_Arduino_Library.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SparkFun_TMAG5273_Arduino_Library.cpp b/src/SparkFun_TMAG5273_Arduino_Library.cpp index 528f158..1998576 100644 --- a/src/SparkFun_TMAG5273_Arduino_Library.cpp +++ b/src/SparkFun_TMAG5273_Arduino_Library.cpp @@ -46,7 +46,9 @@ int8_t TMAG5273::begin(uint8_t sensorAddress, TwoWire &wirePort) setMagneticChannel(TMAG5273_X_Y_Z_ENABLE); setTemperatureEn(true); setOperatingMode(TMAG5273_CONTINUOUS_MEASURE_MODE); - + setAngleEn(TMAG5273_NO_ANGLE_CALCULATION); + setLowPower(TMAG5273_LOW_ACTIVE_CURRENT_MODE); + // Set the axis ranges for the device to be the largest setXYAxisRange(TMAG5273_RANGE_80MT); setZAxisRange(TMAG5273_RANGE_80MT);