diff --git a/apps/recorder/ChangeLog b/apps/recorder/ChangeLog index 1a4e93660e..945ceeaf88 100644 --- a/apps/recorder/ChangeLog +++ b/apps/recorder/ChangeLog @@ -42,3 +42,4 @@ 0.33: Ensure that a new file is always created if the stuff that's being recorded has changed (fix #3081) 0.34: Avoid prompting when creating a new file (#3081) 0.35: Handle loading without a settings file (default record setting) +0.36: When recording with 1 second periods, log time with one decimal. diff --git a/apps/recorder/metadata.json b/apps/recorder/metadata.json index cc912db6f3..9d75c734e4 100644 --- a/apps/recorder/metadata.json +++ b/apps/recorder/metadata.json @@ -2,7 +2,7 @@ "id": "recorder", "name": "Recorder", "shortName": "Recorder", - "version": "0.35", + "version": "0.36", "description": "Record GPS position, heart rate and more in the background, then download to your PC.", "icon": "app.png", "tags": "tool,outdoors,gps,widget,clkinfo", diff --git a/apps/recorder/widget.js b/apps/recorder/widget.js index deaa96508f..2de972aee5 100644 --- a/apps/recorder/widget.js +++ b/apps/recorder/widget.js @@ -176,11 +176,11 @@ }; let getCSVHeaders = activeRecorders => ["Time"].concat(activeRecorders.map(r=>r.fields)); - let writeLog = function() { + let writeLog = function(period) { entriesWritten++; WIDGETS["recorder"].draw(); try { - var fields = [Math.round(getTime())]; + var fields = [period===1?getTime().toFixed(1):Math.round(getTime())]; activeRecorders.forEach(recorder => fields.push.apply(fields,recorder.getValues())); if (storageFile) storageFile.write(fields.join(",")+"\n"); } catch(e) { @@ -222,7 +222,7 @@ } // start recording... WIDGETS["recorder"].draw(); - writeInterval = setInterval(writeLog, settings.period*1000); + writeInterval = setInterval(writeLog, settings.period*1000, settings.period); } else { WIDGETS["recorder"].width = 0; storageFile = undefined;