From e6d4573f701cdaa6bb14c84868bc785740f02744 Mon Sep 17 00:00:00 2001 From: hughbarney Date: Wed, 6 Oct 2021 23:47:09 +0100 Subject: [PATCH] accellog, dont show decimal places for seconds, set Exit as first menu option --- apps.json | 2 +- apps/accellog/ChangeLog | 1 + apps/accellog/app.js | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps.json b/apps.json index 532a0c898..876b243ae 100644 --- a/apps.json +++ b/apps.json @@ -2413,7 +2413,7 @@ "name": "Acceleration Logger", "shortName":"Accel Log", "icon": "app.png", - "version":"0.02", + "version":"0.03", "interface": "interface.html", "description": "Logs XYZ acceleration data to a CSV file that can be downloaded to your PC", "tags": "outdoor,b2", diff --git a/apps/accellog/ChangeLog b/apps/accellog/ChangeLog index 084f26aff..c0097db80 100644 --- a/apps/accellog/ChangeLog +++ b/apps/accellog/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Use the new multiplatform 'Layout' library +0.03: Exit as first menu option, dont show decimal places for seconds diff --git a/apps/accellog/app.js b/apps/accellog/app.js index 3ee88059b..fdb4d52be 100644 --- a/apps/accellog/app.js +++ b/apps/accellog/app.js @@ -8,6 +8,9 @@ function getFileName(n) { function showMenu() { var menu = { "" : { title : "Accel Logger" }, + "Exit" : function() { + load(); + }, "File No" : { value : fileNumber, min : 0, @@ -21,9 +24,6 @@ function showMenu() { "View Logs" : function() { viewLogs(); }, - "Exit" : function() { - load(); - }, }; E.showMenu(menu); } @@ -34,7 +34,7 @@ function viewLog(n) { var records = 0, l = "", ll=""; while ((l=f.readLine())!==undefined) {records++;ll=l;} var length = 0; - if (ll) length = (ll.split(",")[0]|0)/1000; + if (ll) length = Math.round( (ll.split(",")[0]|0)/1000 ); var menu = { "" : { title : "Log "+n }