1
0
Fork 0

Update golf-gps.js

master
jeonlab 2024-06-24 13:32:34 -04:00 committed by GitHub
parent 912354f96b
commit b281c123a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 8 deletions

View File

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