Update golf-gps.js
parent
912354f96b
commit
b281c123a7
|
|
@ -99,11 +99,6 @@ function mainMenu() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function backToClock() {
|
|
||||||
NRF.wake();
|
|
||||||
load();
|
|
||||||
}
|
|
||||||
|
|
||||||
function browseScore() {
|
function browseScore() {
|
||||||
const scoreFiles = require("Storage").list(/^Scorecard-/);
|
const scoreFiles = require("Storage").list(/^Scorecard-/);
|
||||||
if (scoreFiles.length === 0) {
|
if (scoreFiles.length === 0) {
|
||||||
|
|
@ -113,7 +108,7 @@ function browseScore() {
|
||||||
"END": 1
|
"END": 1
|
||||||
}
|
}
|
||||||
}).then(choice => {
|
}).then(choice => {
|
||||||
if (choice === 1) backToClock();
|
if (choice === 1) load();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
let fileIndx = scoreFiles.length - 1;
|
let fileIndx = scoreFiles.length - 1;
|
||||||
|
|
@ -131,7 +126,7 @@ function browseScore() {
|
||||||
}).then(choice => {
|
}).then(choice => {
|
||||||
if (choice === 1) fileIndx = (fileIndx - 1 + scoreFiles.length) % scoreFiles.length;
|
if (choice === 1) fileIndx = (fileIndx - 1 + scoreFiles.length) % scoreFiles.length;
|
||||||
else if (choice === 2) fileIndx = (fileIndx + 1) % scoreFiles.length;
|
else if (choice === 2) fileIndx = (fileIndx + 1) % scoreFiles.length;
|
||||||
else if (choice === 3) backToClock();
|
else if (choice === 3) load();
|
||||||
browseFiles();
|
browseFiles();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +134,6 @@ function browseScore() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fixGPS() {
|
function fixGPS() {
|
||||||
NRF.sleep();
|
|
||||||
Bangle.on('GPS', onGPS);
|
Bangle.on('GPS', onGPS);
|
||||||
Bangle.setGPSPower(1, "golf-gps");
|
Bangle.setGPSPower(1, "golf-gps");
|
||||||
E.showMessage("Golf GPS v0.1\n\nWaiting for GPS fix...\n\nwritten by\nJinseok Jeon\n\n ");
|
E.showMessage("Golf GPS v0.1\n\nWaiting for GPS fix...\n\nwritten by\nJinseok Jeon\n\n ");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue