1
0
Fork 0

cscsensor 0.13: Fix total distance calculation

master
Gordon Williams 2024-06-12 11:22:13 +01:00
parent fd7ea9a587
commit d4d4fb944e
3 changed files with 4 additions and 3 deletions

View File

@ -10,4 +10,5 @@
0.09: Automatically reconnect on error 0.09: Automatically reconnect on error
0.10: Fix cscsensor when using coospoo sensor that supports crank *and* wheel 0.10: Fix cscsensor when using coospoo sensor that supports crank *and* wheel
0.11: Update to use blecsc library 0.11: Update to use blecsc library
0.12: Fix regression reporting cadence (reported per second when should be per minute) (fix #3434) 0.12: Fix regression reporting cadence (reported per second when should be per minute) (fix #3434)
0.13: Fix total distance calculation

View File

@ -68,7 +68,7 @@ class CSCSensor {
} }
updateScreenRevs() { updateScreenRevs() {
var dist = this.distFactor*(this.lastRevs-this.lastRevsStart)*csc.settings.circum/63360.0; var dist = this.distFactor*(this.lastRevs-this.lastRevsStart) * csc.settings.circum/*mm*/ / 1000000;
var ddist = Math.round(100*dist)/100; var ddist = Math.round(100*dist)/100;
var tdist = Math.round(this.distFactor*this.totaldist*10)/10; var tdist = Math.round(this.distFactor*this.totaldist*10)/10;
var dspeed = Math.round(10*this.distFactor*this.speed)/10; var dspeed = Math.round(10*this.distFactor*this.speed)/10;

View File

@ -2,7 +2,7 @@
"id": "cscsensor", "id": "cscsensor",
"name": "Cycling speed sensor", "name": "Cycling speed sensor",
"shortName": "CSCSensor", "shortName": "CSCSensor",
"version": "0.12", "version": "0.13",
"description": "Read BLE enabled cycling speed and cadence sensor and display readings on watch", "description": "Read BLE enabled cycling speed and cadence sensor and display readings on watch",
"icon": "icons8-cycling-48.png", "icon": "icons8-cycling-48.png",
"tags": "outdoors,exercise,ble,bluetooth,bike,cycle,bicycle", "tags": "outdoors,exercise,ble,bluetooth,bike,cycle,bicycle",