From 19cf3d92d998d4ca7d5af9d3572025e16a696584 Mon Sep 17 00:00:00 2001 From: simonmicro Date: Tue, 10 Jan 2023 04:28:49 +0100 Subject: [PATCH] Fix for #344 --- src/hal/environment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hal/environment.cpp b/src/hal/environment.cpp index 29282553b..3f7798af1 100644 --- a/src/hal/environment.cpp +++ b/src/hal/environment.cpp @@ -99,7 +99,7 @@ void OswHal::Environment::setupStepStatistics() { if(!this->accelSensor) throw std::runtime_error("No acceleration provider!"); Preferences prefs; - bool res = prefs.begin(PREFS_STEPS, true); + bool res = prefs.begin(PREFS_STEPS, false); // Open in RW mode, to allow creation as needed assert(res); if(prefs.getBytes(PREFS_STEPS_STATS, &this->_stepsCache, sizeof(this->_stepsCache)) != sizeof(this->_stepsCache)) { // Uoh, the steps history is not initialized -> fill it with zero and do it now!