Merge pull request #3463 from numerist/patch-8

And:
- Update lint config
- Fix doztime lint warnings
pull/3461/head^2
Rob Pilling 2024-06-20 08:11:23 +01:00
commit 9ae5a40280
4 changed files with 12 additions and 21 deletions

View File

@ -5,4 +5,5 @@
0.05: extraneous comments and code removed
display improved
now supports Adjust Clock widget, if installed
0.06: Minor code improvements
0.06: Minor code improvements
0.07: Bangle2: Shift the position of one line on the screen

View File

@ -16,11 +16,12 @@ const B2 = [30,30,30,30,31,31,31,31,31,30,30,30];
const timeColour = "#ffffff";
const dateColours = ["#ff0000","#ff8000","#ffff00","#00ff00","#0080ff","#ff00ff","#ffffff"];
const calen10 = {"size":26,"pt0":[18-g_x_off,16],"step":[16,0],"dx":-4.5,"dy":-4.5}; // positioning for usual calendar line
const calen7 = {"size":26,"pt0":[48-g_x_off,16],"step":[16,0],"dx":-4.5,"dy":-4.5}; // positioning for S-day calendar line
const calen7 = {"size":26,"pt0":[42-g_x_off,16],"step":[16,0],"dx":-4.5,"dy":-4.5}; // positioning for S-day calendar line
const time5 = {"size":42,"pt0":[39-g_x_off,24],"step":[26,0],"dx":-6.5,"dy":-6.5}; // positioning for lull time line
const time6 = {"size":42,"pt0":[26-g_x_off,24],"step":[26,0],"dx":-6.5,"dy":-6.5}; // positioning for twinkling time line ft w 48, 48-g, step 30
const baseYear = 11584;
const baseDate = Date(2020,11,21); // month values run from 0 to 11
let calenDef = calen10;
let accum = new Date(baseDate.getTime());
let sequence = [];
let timeActiveUntil;
@ -139,7 +140,7 @@ function writeDozTime(text,def){
}
}
function writeDozDate(text,def,colour){
dateColour = colour;
//let pts = def.pts;
let x=def.pt0[0];
@ -169,20 +170,22 @@ function drawTime()
let date = "";
let timeDef;
let x = 0;
let time;
let wait;
dt.setDate(dt.getDate());
if(addTimeDigit){
x =
10368*dt.getHours()+172.8*dt.getMinutes()+2.88*dt.getSeconds()+0.00288*dt.getMilliseconds();
let msg = "00000"+Math.floor(x).toString(12);
let time = msg.substr(-5,3)+"."+msg.substr(-2); //TODO: should `time` and `wait` have been defined outside the if block?
let wait = 347*(1-(x%1));
time = msg.substr(-5,3)+"."+msg.substr(-2); //TODO: should `time` and `wait` have been defined outside the if block?
wait = 347*(1-(x%1));
timeDef = time6;
} else {
x =
864*dt.getHours()+14.4*dt.getMinutes()+0.24*dt.getSeconds()+0.00024*dt.getMilliseconds();
let msg = "0000"+Math.floor(x).toString(12);
let time = msg.substr(-4,3)+"."+msg.substr(-1);
let wait = 4167*(1-(x%1));
time = msg.substr(-4,3)+"."+msg.substr(-1);
wait = 4167*(1-(x%1));
timeDef = time5;
}
if(lastX > x){ res = getDate(dt); } // calculate date once at start-up and once when turning over to a new day

View File

@ -2,7 +2,7 @@
"id": "doztime",
"name": "Dozenal Digital Time",
"shortName": "Dozenal Digital",
"version": "0.06",
"version": "0.07",
"description": "A dozenal Holocene calendar and dozenal diurnal digital clock",
"icon": "app.png",
"type": "clock",

View File

@ -412,13 +412,6 @@ module.exports = {
"no-unused-vars"
]
},
"apps/doztime/app-bangle2.js": {
"hash": "81592fe1bc6537f80d7dbe7b2e8145924d2400f98ea780c68dd5bd9694376c8a",
"rules": [
"no-unused-vars",
"no-undef"
]
},
"apps/devstopwatch/app.js": {
"hash": "28ca59e605f280a2d8fd4a74f553783205d51f8bb7042d6f51cf8ec11d44c264",
"rules": [
@ -516,12 +509,6 @@ module.exports = {
"no-undef"
]
},
"apps/astrocalc/astrocalc-app.js": {
"hash": "29f978064e42f947b36c94ab3f212512fb5d0a41fa265354c6039e2cf042b92c",
"rules": [
"no-unused-vars"
]
},
"apps/HRV/app.js": {
"hash": "265b4b0272c43126670b5026079711354cee0a211096bcd2c18139b7a3ee774a",
"rules": [