gpsrec 0.19: Fix memory usage issues inside track viewer app

pull/721/head
Gordon Williams 2021-04-14 13:10:19 +01:00
parent 039024c4ad
commit ae25b098bf
3 changed files with 6 additions and 5 deletions

View File

@ -417,7 +417,7 @@
{ "id": "gpsrec",
"name": "GPS Recorder",
"icon": "app.png",
"version":"0.18",
"version":"0.19",
"interface": "interface.html",
"description": "Application that allows you to record a GPS track. Can run in background",
"tags": "tool,outdoors,gps,widget",

View File

@ -20,3 +20,4 @@
0.16: Add gpsrec app to Settings menu
0.17: Disable recording if storage is full (fix #574)
0.18: Period counter now uses GPS time rather than counting packets (allows use with GPS Setup)
0.19: Fix memory usage issues inside track viewer app

View File

@ -51,7 +51,7 @@ function showMainMenu() {
updateSettings();
}
},
'View Tracks': viewTracks,
'View Tracks': ()=>{viewTracks();},
'< Back': ()=>{load();}
};
return E.showMenu(mainmenu);
@ -65,13 +65,13 @@ function viewTracks() {
for (var n=0;n<36;n++) {
var f = require("Storage").open(getFN(n),"r");
if (f.readLine()!==undefined) {
menu["Track "+n] = viewTrack.bind(null,n,false);
menu["Track "+n] = (n=>viewTrack(n)).bind(null,n,false);
found = true;
}
}
if (!found)
menu["No Tracks found"] = function(){};
menu['< Back'] = showMainMenu;
menu['< Back'] = () => { showMainMenu(); };
return E.showMenu(menu);
}
@ -161,7 +161,7 @@ function viewTrack(n, info) {
viewTrack(n, info);
});
};
menu['< Back'] = viewTracks;
menu['< Back'] = () => { viewTracks(); };
return E.showMenu(menu);
}