Merge pull request #843 from hughbarney/master

accellog, dont show decimal places for seconds, set Exit as first menu option
master
Gordon Williams 2021-10-07 08:57:40 +01:00 committed by GitHub
commit d7cb93a2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -2413,7 +2413,7 @@
"name": "Acceleration Logger", "name": "Acceleration Logger",
"shortName":"Accel Log", "shortName":"Accel Log",
"icon": "app.png", "icon": "app.png",
"version":"0.02", "version":"0.03",
"interface": "interface.html", "interface": "interface.html",
"description": "Logs XYZ acceleration data to a CSV file that can be downloaded to your PC", "description": "Logs XYZ acceleration data to a CSV file that can be downloaded to your PC",
"tags": "outdoor,b2", "tags": "outdoor,b2",

View File

@ -1,2 +1,3 @@
0.01: New App! 0.01: New App!
0.02: Use the new multiplatform 'Layout' library 0.02: Use the new multiplatform 'Layout' library
0.03: Exit as first menu option, dont show decimal places for seconds

View File

@ -8,6 +8,9 @@ function getFileName(n) {
function showMenu() { function showMenu() {
var menu = { var menu = {
"" : { title : "Accel Logger" }, "" : { title : "Accel Logger" },
"Exit" : function() {
load();
},
"File No" : { "File No" : {
value : fileNumber, value : fileNumber,
min : 0, min : 0,
@ -21,9 +24,6 @@ function showMenu() {
"View Logs" : function() { "View Logs" : function() {
viewLogs(); viewLogs();
}, },
"Exit" : function() {
load();
},
}; };
E.showMenu(menu); E.showMenu(menu);
} }
@ -34,7 +34,7 @@ function viewLog(n) {
var records = 0, l = "", ll=""; var records = 0, l = "", ll="";
while ((l=f.readLine())!==undefined) {records++;ll=l;} while ((l=f.readLine())!==undefined) {records++;ll=l;}
var length = 0; var length = 0;
if (ll) length = (ll.split(",")[0]|0)/1000; if (ll) length = Math.round( (ll.split(",")[0]|0)/1000 );
var menu = { var menu = {
"" : { title : "Log "+n } "" : { title : "Log "+n }