The global variables present in the magnetometer code take several kilobytes of memory of any SensESP project, regardless of whether the magnetometer is used or not. They need to be removed (moved into classes that are only instantiated when actually used).
Some work in this direction was done in PR #166 but there still exists at least an instance of Adafruit_NXPSensorFusion that takes several KiB of memory. I tested this by removing the magnetometer source code, recompiling, and comparing the free memory figures before and after.
The global variables present in the magnetometer code take several kilobytes of memory of any SensESP project, regardless of whether the magnetometer is used or not. They need to be removed (moved into classes that are only instantiated when actually used).
Some work in this direction was done in PR #166 but there still exists at least an instance of
Adafruit_NXPSensorFusion
that takes several KiB of memory. I tested this by removing the magnetometer source code, recompiling, and comparing the free memory figures before and after.