astrocalc: fix lint warnings

- Comment out an unused function
- move initialization, `let m;` further up in the file.
master
thyttan 2024-06-09 15:36:03 +02:00 committed by GitHub
parent db4ce65672
commit fe3142355b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 4 deletions

View File

@ -232,6 +232,8 @@ function drawSunShowPage(gps, key, date) {
return null; return null;
} }
let m;
function sunIndexPageMenu(gps) { function sunIndexPageMenu(gps) {
const sunTimes = SunCalc.getTimes(new Date(), gps.lat, gps.lon); const sunTimes = SunCalc.getTimes(new Date(), gps.lat, gps.lon);
@ -300,9 +302,9 @@ function indexPageMenu(gps) {
return E.showMenu(menu); return E.showMenu(menu);
} }
function getCenterStringX(str) { //function getCenterStringX(str) {
return (g.getWidth() - g.stringWidth(str)) / 2; // return (g.getWidth() - g.stringWidth(str)) / 2;
} //}
function init() { function init() {
let location = require("Storage").readJSON("mylocation.json",1)||{"lat":51.5072,"lon":0.1276,"location":"London"}; let location = require("Storage").readJSON("mylocation.json",1)||{"lat":51.5072,"lon":0.1276,"location":"London"};
@ -311,5 +313,4 @@ function init() {
Bangle.drawWidgets(); Bangle.drawWidgets();
} }
let m;
init(); init();