Skip to content

Commit

Permalink
Fix for #344 (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmicro authored Jan 12, 2023
2 parents ad3c8f8 + 19cf3d9 commit 92bb5f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hal/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 92bb5f1

Please sign in to comment.