1
0
Fork 0

Merge branch 'ffcniftya-clock-0.02'

master
Danny 2021-12-26 03:31:49 +01:00
commit 8086bf4b0a
2 changed files with 7 additions and 10 deletions

View File

@ -3,19 +3,16 @@
Colors are black/white - photos have non correct camera color "blue"
## This is the clock
![](screenshot_nifty.png)
*emulated*
![](screenshot_nifty.png) (*emulated*)
![](photo_nifty.png)
*photo*
![](photo_nifty.png) (*photo*)
## The week number can be turned of in settings
(default is **"On"**)
![](screenshot_settings_nifty.png)
*emulated*
![](screenshot_settings_nifty.png) (*emulated*)
![](photo_settings_nifty.png)
*photo*
![](photo_settings_nifty.png) (*photo*)

View File

@ -1,6 +1,6 @@
const locale = require("locale");
const is12Hour = (require("Storage").readJSON("setting.json", 1) || {})["12hour"];
const CFG = require('Storage').readJSON("ffcniftya.json", 1) || {showWeek: true};
const CFG = require('Storage').readJSON("ffcniftya.json", 1) || {showWeekNum: true};
/* Clock *********************************************/
const scale = g.getWidth() / 176;
@ -59,7 +59,7 @@ function draw() {
g.drawString(year, centerDatesScaleX, center.y - 62 * scale);
g.drawString(month, centerDatesScaleX, center.y - 44 * scale);
g.drawString(day, centerDatesScaleX, center.y - 26 * scale);
if (CFG.showWeek) g.drawString(d02(ISO8601_week_no(now)), centerDatesScaleX, center.y + 15 * scale);
if (CFG.showWeekNum) g.drawString(d02(ISO8601_week_no(now)), centerDatesScaleX, center.y + 15 * scale);
g.drawString(monthName, centerDatesScaleX, center.y + 48 * scale);
g.drawString(dayName, centerDatesScaleX, center.y + 66 * scale);
}