From 06b493d1ec9cc10a5f79a5499d0bac0e28842c91 Mon Sep 17 00:00:00 2001 From: "Marko.Kl.Berkenbusch@gmail.com" Date: Thu, 10 Sep 2020 21:19:48 -0400 Subject: [PATCH] Save mileage adjustment --- apps/cscsensor/README.md | 2 +- apps/cscsensor/cscsensor.app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/cscsensor/README.md b/apps/cscsensor/README.md index 4df609e6c..8ba862241 100644 --- a/apps/cscsensor/README.md +++ b/apps/cscsensor/README.md @@ -10,7 +10,7 @@ Currently the app displays the following data: - trip distance traveled - total distance traveled -Button 1 resets all measurements except total distance traveled. The latter gets preserved by being written to storage every 0.2 miles and upon exiting the app. +Button 1 resets all measurements except total distance traveled. The latter gets preserved by being written to storage every 0.1 miles and upon exiting the app. I do not have access to a cadence sensor at the moment, so only the speed part is currently implemented. Values displayed are imperial or metric (depending on locale), the wheel circumference can be adjusted in the global settings app. diff --git a/apps/cscsensor/cscsensor.app.js b/apps/cscsensor/cscsensor.app.js index fad1e2f83..8db7ef41a 100644 --- a/apps/cscsensor/cscsensor.app.js +++ b/apps/cscsensor/cscsensor.app.js @@ -67,7 +67,7 @@ class CSCSensor { if (dRevs>0) { qChanged = true; this.totaldist += dRevs*this.wheelCirc/63360.0; - if ((this.totaldist-this.settings.totaldist)>0.2) { + if ((this.totaldist-this.settings.totaldist)>0.1) { this.settings.totaldist = this.totaldist; storage.writeJSON(SETTINGS_FILE, this.settings); }