Merge branch 'master' of github.com:espruino/BangleApps

master
Gordon Williams 2021-10-07 11:09:49 +01:00
commit f3712e6676
4 changed files with 12 additions and 11 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 }

View File

@ -1,15 +1,15 @@
var DateFormatter = require("slidingtext.dtfmt.js"); var DateFormatter = require("slidingtext.dtfmt.js");
const germanNumberStr = [ ["ZERO",""], // 0 const germanNumberStr = [ ["NULL",""], // 0
["EINS",""], // 1 ["EINS",""], // 1
["ZWEI",""], //2 ["ZWEI",""], //2
["DREI",''], //3 ["DREI",''], //3
["VIER",''], //4 ["VIER",''], //4
["FÜNF",''], //5 ["FÜNF",''], //5
["SECHS",''], //6 ["SECHS",''], //6
["SEIBEN",''], //7 ["SIEBEN",''], //7
["ACHT",''], //8 ["ACHT",''], //8
["NUEN",''], // 9, ["NEUN",''], // 9,
["ZEHN",''], // 10 ["ZEHN",''], // 10
["ELF",''], // 11, ["ELF",''], // 11,
["ZWÖLF",''], // 12 ["ZWÖLF",''], // 12
@ -22,7 +22,7 @@ const germanNumberStr = [ ["ZERO",""], // 0
["NEUN",'ZEHN'], // 19 ["NEUN",'ZEHN'], // 19
]; ];
const germanTensStr = ["ZERO",//0 const germanTensStr = ["NULL",//0
"ZEHN",//10 "ZEHN",//10
"ZWANZIG",//20 "ZWANZIG",//20
"DREIßIG",//30 "DREIßIG",//30
@ -38,7 +38,7 @@ const germanUnit = ["",//0
"VIERUND", //4 "VIERUND", //4
"FÜNFUND", //5 "FÜNFUND", //5
"SECHSUND", //6 "SECHSUND", //6
"SEIBENUND", //7 "SIEBENUND", //7
"ACHTUND", //8 "ACHTUND", //8
"NEUNUND" //9 "NEUNUND" //9
] ]