sparkfun / OpenLog_Artemis

The OpenLog Artemis is an open source datalogger the comes preprogrammed to automatically log IMU, GPS, serial data, and various pressure, humidity, and distance sensors. All without writing a single line of code!
https://www.sparkfun.com/products/15846
Other
88 stars 47 forks source link

IMU fails to init if settings.enableSD is manually set to disabled. #104

Closed harri192 closed 2 years ago

harri192 commented 3 years ago

Subject of the issue

Encountering very weird behavior if I set the settings.enableSD to false.

If I leave a microSD card in after bootloading, then the OLA will continuously reset itself. If I then pull the microSD card out, the OLA is able to boot up, however I get errors that the IMU failed to initialize.

Your workbench

Steps to reproduce

Tell us how to reproduce this issue. Please post stripped down example code demonstrating your issue. Try setting the settings.enableSD to false and observe behavior.

Expected behavior

Tell us what should happen I expected that if you disable the SD card that the remaining onboard sensors should still operate fine. Along those same line, even with the enableSD set to false, leaving in an SD card shouldn't cause issues.

Actual behavior

Changing setting.enableSD to false prevented the IMU for initializing. If an SD card was left in, the entire OLA would just continously reset itself (which almost made me think I bricked my board because I couldn't re-upload code in that configuration). If the SD card was removed the OLA was able to run through the whole setup routine but the IMU failed to initialize.

PaulZC commented 3 years ago

Hi @harri192 , Thank you for reporting this issue. I guess you must be editing the OLA_settings file manually and setting enableSD to false / 0? Looking at the code, I think enableSD is probably obsolete and has been superseded by logData / logSerial and online.microSD. There appears to be no way to disable enableSD through the menus. It should always be enabled, unless you edit the settings file. I think the fix will be to remove enableSD from the code - after some careful checking. I will include this in the next release. Best wishes, Paul

PaulZC commented 2 years ago

Thank you for reporting this @harri192 - it is corrected in v2.1. Best wishes, Paul