Another tweak - keep outputting newlines for each file even if they don't exist, which should stop any timeout

master
Gordon Williams 2021-03-16 10:32:56 +00:00
parent ffcd36084b
commit a812d1caab
1 changed files with 1 additions and 2 deletions

View File

@ -98,8 +98,7 @@ function getTrackList() {
for (var n=0;n<36;n++) {
var f = require("Storage").open(".gpsrc"+n.toString(36),"r");
var l = f.readLine();
if (l!==undefined)
Bluetooth.println(n+","+l.trim());
Bluetooth.println((l!==undefined) ? (n + "," + l.trim()) : "");
}
})()\n`,tracklist=>{
var trackLines = tracklist.trim().split("\n").filter(l=>l!="");