Fixing lint warnings for unused vars
parent
306ccb3fe3
commit
89e01a41de
|
|
@ -1,3 +1,4 @@
|
|||
0.1: (2024-02-23) initial alpha upload
|
||||
0.2: (2024-02-23) fixed minor issues with settings
|
||||
0.3: (2024-03-01) advanced settings, rearanged ui elements, fixed rendering problems
|
||||
0.10: (2024-02-23) initial alpha upload
|
||||
0.20: (2024-02-23) fixed minor issues with settings
|
||||
0.30: (2024-03-01) advanced settings, rearanged ui elements, fixed rendering problems
|
||||
0.40: Fixing lint warnings for unused vars
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "regattatimer",
|
||||
"name": "Regatta Timer",
|
||||
"shortName": "RegattaTimer",
|
||||
"version": "0.3",
|
||||
"version": "0.40",
|
||||
"description": "Regatta Timer with 5-4-1 Countdown",
|
||||
"icon": "icon.png",
|
||||
"tags": "tool,outdoors,sailing,race,regatta,boat,timer",
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
(function(back) {
|
||||
var
|
||||
file = "regattatimer.json",
|
||||
|
||||
storage = require("Storage"),
|
||||
|
||||
dials = ["Numeric", "Discs"],
|
||||
|
||||
/*dials = ["Numeric", "Discs"],*/
|
||||
themes = ["Light", "Dark"],
|
||||
|
||||
settings = Object.assign({
|
||||
"debug": false,
|
||||
"buzzer": true,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
0.1: Llançament inicial
|
||||
0.2: Esmenat problema amb les hores passada l'hora en punt (apareixia l'hora anterior)
|
||||
0.3: Redisseny de l'aplicatiu, text alineat a l'esquerra, font canviada, treiem dades innecessàries
|
||||
0.4: Afegits suggeriments de l'usuari @bobrippling al codi
|
||||
0.10: Llançament inicial
|
||||
0.20: Esmenat problema amb les hores passada l'hora en punt (apareixia l'hora anterior)
|
||||
0.30: Redisseny de l'aplicatiu, text alineat a l'esquerra, font canviada, treiem dades innecessàries
|
||||
0.40: Afegits suggeriments de l'usuari @bobrippling al codi
|
||||
0.50: Fixing lint warnings for unused vars
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "rellotge",
|
||||
"name": "Rellotge en catala",
|
||||
"shortName":"Rellotge",
|
||||
"version":"0.4",
|
||||
"version":"0.50",
|
||||
"description": "A catalan clock with traditional naming of hous",
|
||||
"icon": "icona.js",
|
||||
"readme": "README.md",
|
||||
|
|
|
|||
|
|
@ -4,14 +4,11 @@
|
|||
|
||||
const timeFontSize = 1;
|
||||
const dateFontSize = 2;
|
||||
const gmtFontSize = 10;
|
||||
const font = "12x20";
|
||||
|
||||
const xyCenter = g.getWidth() /9;
|
||||
const yposTime = 55;
|
||||
const yposDate = 130;
|
||||
const yposYear = 175;
|
||||
const yposGMT = 220;
|
||||
const leshores = ["Les dotze","La una","Les dues","les tres","Les quatre","Les cinc","Les sis","Les set","Les vuit","Les nou","Les deu","Les onze","Les dotze","La una","Les dues","Les tres","Les quatre","Les cinc","Les sis","Les set","Les vuit","Les nou","Les deu","Les onze","Les dotze"];
|
||||
const leshores2 = ["d\'una\r\nel mati","de dues\r\ndel mati","de tres\r\ndel mati","de quatre\r\ndel mati","de cinc\r\ndel mati","de sis\r\ndel mati","de set\r\ndel mati","de vuit\r\ndel mati","de nou\r\ndel mati","de deu\r\ndel mati","d'onze\r\ndel mati","de dotze\r\ndel mati","d'una\r\nde la tarda","de dues\r\nde la tarda","de tres\r\nde la tarda","de quatre\r\nde la tarda","de cinc\r\nde la tarda","de sis\r\nde la tarda","de set\r\nde la tarda","de vuit\r\nde la tarda","de nou\r\ndel vespre","de deu\r\ndel vespre","d'onze\r\ndel vespre","de dotze"];
|
||||
|
||||
|
|
@ -19,15 +16,12 @@
|
|||
g.clearRect(Bangle.appRect);
|
||||
// get date
|
||||
var d = new Date();
|
||||
var da = d.toString().split(" ");
|
||||
var m = d.getMinutes();
|
||||
|
||||
// drawSting centered
|
||||
g.setFontAlign(-1, 0);
|
||||
|
||||
// draw time
|
||||
var time = da[4].substr(0, 5);
|
||||
var hora = time.split(":");
|
||||
if (m >= 0 && m < 2) {
|
||||
t = leshores[d.getHours()] + "\r\nen punt";
|
||||
} else if (m >= 2 && m < 5) {
|
||||
|
|
@ -80,16 +74,12 @@
|
|||
g.setFont(font, timeFontSize);
|
||||
g.drawString(t, xyCenter, yposTime, true);
|
||||
|
||||
// draw Day, name of month, Date
|
||||
var date = [da[0], da[1], da[2]].join(" ");
|
||||
// draw Hours
|
||||
g.setFont(font, dateFontSize);
|
||||
|
||||
var mu = "";
|
||||
if (m < 10) {mu = "0"+m;} else {mu = m;}
|
||||
|
||||
g.drawString(d.getHours()+":"+mu, xyCenter, yposDate, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// handle switch display on by pressing BTN1
|
||||
|
|
|
|||
Loading…
Reference in New Issue