Update golf-gps.js

pull/3467/head
jeonlab 2024-07-01 09:06:27 -04:00 committed by GitHub
parent 5a2f18885c
commit 228265ba69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -238,7 +238,7 @@ function showPlayData() {
function finishGame() {
let date = new Date();
let saveFileContents = ' '; // ALT 255
let saveFileContents = ' ';
let parTotal = 0;
Bangle.setGPSPower(0);
@ -246,7 +246,7 @@ function finishGame() {
const saveFile = require("Storage").open(saveFilename, "w");
for (let i = 1; i < 19; i++) {
saveFileContents += String(score[i] - par[i]).padStart(2, ' ');
saveFileContents += (i == 18 ? ' ' : (i % 6 == 0 ? ' \n ' : ''));
saveFileContents += (i == 18 ? ' ' : (i % 6 == 0 ? ' \n ' : ''));
parTotal += par[i];
}
saveFile.write(`${date.getFullYear()}_${zeroPad(date.getMonth() + 1, 2)}_${zeroPad(date.getDate(), 2)}\n${courseName}${totalShots}/${parTotal}\n${saveFileContents}`);