diff --git a/apps.json b/apps.json index 25093a5a3..e329b00e5 100644 --- a/apps.json +++ b/apps.json @@ -4319,8 +4319,10 @@ "description": "Famous binary watch", "tags": "clock", "type": "clock", - "storage": [ + "storage": [ {"name":"binwatch.app.js","url":"app.js"}, + {"name":"binwatch.bg176.img","url":"Background176_center.img"}, + {"name":"binwatch.bg240.img","url":"Background240_center.img"}, {"name":"binwatch.img","url":"app-icon.js","evaluate":true} ] }, diff --git a/apps/binwatch/Background176_center.img b/apps/binwatch/Background176_center.img new file mode 100644 index 000000000..4d4b587de Binary files /dev/null and b/apps/binwatch/Background176_center.img differ diff --git a/apps/binwatch/Background240_center.img b/apps/binwatch/Background240_center.img new file mode 100644 index 000000000..abf95107d Binary files /dev/null and b/apps/binwatch/Background240_center.img differ diff --git a/apps/binwatch/Background240_center.png b/apps/binwatch/Background240_center.png index 6fa35f93f..c2b108f4d 100644 Binary files a/apps/binwatch/Background240_center.png and b/apps/binwatch/Background240_center.png differ diff --git a/apps/binwatch/ChangeLog b/apps/binwatch/ChangeLog index bf4f5075a..1e54f489c 100644 --- a/apps/binwatch/ChangeLog +++ b/apps/binwatch/ChangeLog @@ -1,3 +1,4 @@ 0.01: start of development 0.02: first running version for BangleJs2 0.03: corrected icon, added screen shot, extended description +0.04: corrected format of background image (raw binary) diff --git a/apps/binwatch/app.js b/apps/binwatch/app.js index 56e153dbf..28d7a06a5 100644 --- a/apps/binwatch/app.js +++ b/apps/binwatch/app.js @@ -12,7 +12,6 @@ require("Font7x11Numeric7Seg").add(Graphics); require("Font5x7Numeric7Seg").add(Graphics); - /* constants and definitions */ /* Bangle 2: 176 x 176 */ @@ -63,7 +62,7 @@ const V2_BAT_SIZE_Y = 2; const V2_SCREEN_SIZE_X = 176; const V2_SCREEN_SIZE_Y = 176; -const V2_BACKGROUND_IMAGE = "Background176_center.png"; +const V2_BACKGROUND_IMAGE = "binwatch.bg176.img"; const V2_BG_COLOR = 0; const V2_FG_COLOR = 1; @@ -91,7 +90,7 @@ const V1_BAT_SIZE_X = 3; const V1_BAT_SIZE_Y = 5; const V1_SCREEN_SIZE_X = 240; const V1_SCREEN_SIZE_Y = 240; -const V1_BACKGROUND_IMAGE = "Background240_center.png"; +const V1_BACKGROUND_IMAGE = "binwatch.bg240.img"; const V1_BG_COLOR = 1; const V1_FG_COLOR = 0; @@ -293,7 +292,7 @@ function setRuntimeValues(resolution) { bat_size_x = V1_BAT_SIZE_X; bat_size_y = V1_BAT_SIZE_Y; - setWatch(toggleDateTime, BTN1, { repeat : true, edge: "falling"}); + setWatch(toggleDateTime, BTN1, { repeat : true, edge: "falling"}); } else { x_step = V2_X_STEP; @@ -362,8 +361,7 @@ function draw() { updateVTime(); g.clear(); g.drawImages([{image:cgimg}, - {image:require("Storage").read(backgroundImage)}, -// { x:bt_x, y:bt_y, rotate: 0, image:require("Storage").read("bt-icon.png")}, + {image:require("Storage").read(backgroundImage)} ]); drawBT(g, NRF.getSecurityStatus().connected); // Bangle.drawWidgets();