Save mileage adjustment

pull/557/head
Marko.Kl.Berkenbusch@gmail.com 2020-09-10 21:19:48 -04:00
parent 5cbc826e95
commit 06b493d1ec
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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);
}