1
0
Fork 0

Merge branch 'espruino:master' into master

master
Peer David 2021-11-24 11:10:36 +01:00 committed by GitHub
commit b1fb0e6b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 140 additions and 49 deletions

View File

@ -137,6 +137,7 @@
"icon": "app.png",
"tags": "tool,system",
"supports": ["BANGLEJS","BANGLEJS2"],
"screenshots": [{"url":"bangle1-about-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"about.app.js","url":"app-bangle1.js","supports": ["BANGLEJS"]},
@ -238,6 +239,7 @@
"tags": "start,welcome",
"supports": ["BANGLEJS"],
"custom": "custom.html",
"screenshots": [{"url":"bangle1-customized-welcome-screenshot.png"}],
"storage": [
{"name":"mywelcome.boot.js","url":"boot.js"},
{"name":"mywelcome.app.js","url":"app.js"},
@ -274,6 +276,7 @@
"tags": "clock",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-morphing-clock-screenshot.png"}],
"storage": [
{"name":"mclock.app.js","url":"clock-morphing.js"},
{"name":"mclock.img","url":"clock-morphing-icon.js","evaluate":true}
@ -288,6 +291,7 @@
"icon": "app.png",
"tags": "",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-moon-phase-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"moonphase.app.js","url":"app.js"},
@ -418,6 +422,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-sweep-clock-screenshot.png"}],
"storage": [
{"name":"sweepclock.app.js","url":"sweepclock.js"},
{"name":"sweepclock.img","url":"sweepclock-icon.js","evaluate":true}
@ -468,6 +473,7 @@
"type": "clock",
"tags": "clock",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-impercise-word-clock-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"impwclock.app.js","url":"clock-impword.js"},
@ -551,6 +557,7 @@
"supports" : ["BANGLEJS","BANGLEJS2"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle2-cube-scramble-screenshot.png"},{"url":"bangle1-cube-scramble-screenshot.png"}],
"storage": [
{"name":"cubescramble.app.js","url":"cube-scramble.js"},
{"name":"cubescramble.img","url":"cube-scramble-icon.js","evaluate":true}
@ -654,7 +661,7 @@
{
"id": "gpsrec",
"name": "GPS Recorder",
"version": "0.24",
"version": "0.25",
"description": "Application that allows you to record a GPS track. Can run in background",
"icon": "app.png",
"tags": "tool,outdoors,gps,widget",
@ -775,6 +782,7 @@
"tags": "battery",
"supports": ["BANGLEJS", "BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"bangle2-charge-animation-screenshot.png"},{"url":"bangle-charge-animation-screenshot.png"}],
"storage": [
{"name":"chargeanim.app.js","url":"app.js"},
{"name":"chargeanim.boot.js","url":"boot.js"},
@ -980,6 +988,7 @@
"readme": "README.md",
"interface": "interface.html",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-stopwatch-screenshot.png"}],
"storage": [
{"name":"swatch.app.js","url":"stopwatch.js"},
{"name":"swatch.img","url":"stopwatch-icon.js","evaluate":true}
@ -1181,6 +1190,7 @@
"tags": "clock",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-vibrate-clock-screenshot.png"}],
"storage": [
{"name":"vibrclock.app.js","url":"app.js"},
{"name":"vibrclock.img","url":"app-icon.js","evaluate":true}
@ -1196,6 +1206,7 @@
"tags": "clock",
"supports": ["BANGLEJS","BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"bangle2-simple-v-clock-screenshot.png"}],
"storage": [
{"name":"svclock.app.js","url":"vclock-simple.js"},
{"name":"svclock.img","url":"vclock-simple-icon.js","evaluate":true}
@ -1211,6 +1222,7 @@
"tags": "clock",
"supports": ["BANGLEJS","BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"bangle2-dev-clock-screenshot.png"},{"url":"bangle1-dev-clock-screenshot.png"}],
"storage": [
{"name":"dclock.app.js","url":"clock-dev.js"},
{"name":"dclock.img","url":"clock-dev-icon.js","evaluate":true}
@ -1242,6 +1254,7 @@
"tags": "party,parrot,lol",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-party-parrot-screenshot.png"}],
"storage": [
{"name":"pparrot.app.js","url":"party-parrot.js"},
{"name":"pparrot.img","url":"party-parrot-icon.js","evaluate":true}
@ -1257,6 +1270,7 @@
"tags": "rings,hypnosis,psychadelic",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-hypno-rings-screenshot.png"}],
"storage": [
{"name":"hrings.app.js","url":"hypno-rings.js"},
{"name":"hrings.img","url":"hypno-rings-icon.js","evaluate":true}
@ -1324,6 +1338,7 @@
"icon": "show-color.png",
"type": "app",
"tags": "tool",
"screenshots": [{"url":"bangle1-view-color-screenshot.png"}],
"supports": ["BANGLEJS"],
"allow_emulator": true,
"storage": [
@ -1339,6 +1354,7 @@
"icon": "clock-mixed.png",
"type": "clock",
"tags": "clock",
"screenshots": [{"url":"bangle1-mixed-clock-screenshot.png"}],
"supports": ["BANGLEJS"],
"allow_emulator": true,
"storage": [
@ -1356,6 +1372,7 @@
"tags": "clock",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-binary-clock-screenshot.png"}],
"storage": [
{"name":"bclock.app.js","url":"clock-binary.js"},
{"name":"bclock.img","url":"clock-binary-icon.js","evaluate":true}
@ -1369,6 +1386,7 @@
"icon": "clock-tris.png",
"tags": "game",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-clock-tris-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"clotris.app.js","url":"clock-tris.js"},
@ -1428,6 +1446,7 @@
"tags": "pomodoro,cooking,tools",
"supports": ["BANGLEJS", "BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"bangle2-pomodoro-screenshot.png"}],
"storage": [
{"name":"pomodo.app.js","url":"pomodoro.js"},
{"name":"pomodo.img","url":"pomodoro-icon.js","evaluate":true}
@ -1444,6 +1463,7 @@
"tags": "clock",
"supports": ["BANGLEJS","BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"bangle2-large-digit-blob-clock-screenshot.png"},{"url":"bangle1-large-digit-blob-clock-screenshot.png"}],
"storage": [
{"name":"blobclk.app.js","url":"clock-blob.js"},
{"name":"blobclk.img","url":"clock-blob-icon.js","evaluate":true}
@ -1503,6 +1523,7 @@
"tags": "clock",
"supports": ["BANGLEJS","BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"berlin-clock-screenshot.png"}],
"storage": [
{"name":"berlinc.app.js","url":"berlin-clock.js"},
{"name":"berlinc.img","url":"berlin-clock-icon.js","evaluate":true}
@ -1517,6 +1538,7 @@
"type": "clock",
"tags": "clock",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-center-clock-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"ctrclk.app.js","url":"app.js"},
@ -1531,6 +1553,7 @@
"icon": "app.png",
"type": "app",
"tags": "",
"screenshots": [{"url":"bangle1-demo-loop-screenshot1.png"},{"url":"bangle1-demo-loop-screenshot2.png"},{"url":"bangle1-demo-loop-screenshot3.png"},{"url":"bangle1-demo-loop-screenshot4.png"}],
"supports": ["BANGLEJS"],
"allow_emulator": true,
"storage": [
@ -1563,6 +1586,7 @@
"tags": "clock",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-pipboy-themed-clock-screenshot.png"}],
"storage": [
{"name":"pipboy.app.js","url":"app.js"},
{"name":"pipboy.img","url":"app-icon.js","evaluate":true}
@ -1609,6 +1633,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-workout-HRM-screenshot.png"}],
"storage": [
{"name":"wohrm.app.js","url":"app.js"},
{"name":"wohrm.img","url":"app-icon.js","evaluate":true}
@ -1653,6 +1678,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": false,
"screenshots": [{"url":"bangle1-mario-clock-screenshot.png"}],
"storage": [
{"name":"marioclock.app.js","url":"marioclock-app.js"},
{"name":"marioclock.img","url":"marioclock-icon.js","evaluate":true}
@ -1715,6 +1741,7 @@
"tags": "clock",
"supports": ["BANGLEJS","BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"bangle2-dot-clcok-screenshot.png"},{"url":"bangle1-dot-clock-screenshot.png"}],
"storage": [
{"name":"dotclock.app.js","url":"clock-dot.js"},
{"name":"dotclock.img","url":"clock-dot-icon.js","evaluate":true}
@ -1824,6 +1851,7 @@
"tags": "game,fun",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-rpg-dice-screenshot.png"}],
"storage": [
{"name":"rpgdice.app.js","url":"app.js"},
{"name":"rpgdice.img","url":"app-icon.js","evaluate":true}
@ -1852,6 +1880,7 @@
"tags": "clock,minion",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-minion-clock-screenshot.png"}],
"storage": [
{"name":"minionclk.app.js","url":"app.js"},
{"name":"minionclk.img","url":"app-icon.js","evaluate":true}
@ -1929,7 +1958,7 @@
"icon": "custom.png",
"type": "bootloader",
"tags": "tool,system",
"supports": ["BANGLEJS"],
"supports": ["BANGLEJS","BANGLEJS2"],
"custom": "custom.html",
"storage": [
{"name":"custom"}
@ -1944,6 +1973,7 @@
"icon": "app.png",
"tags": "stopwatch,chrono,timer,chronometer",
"supports": ["BANGLEJS","BANGLEJS2"],
"screenshots": [{"url":"bangle1-dev-stopwatch-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"devstopwatch.app.js","url":"app.js"},
@ -1977,6 +2007,7 @@
"tags": "app,learn,visual",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-NATO-alphabet-screenshot.png"},{"url":"bangle1-NATO-alphabet-screenshot2.png"}],
"storage": [
{"name":"nato.app.js","url":"nato.js"},
{"name":"nato.img","url":"nato-icon.js","evaluate":true}
@ -1993,6 +2024,7 @@
"tags": "numerals,clock",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-numerals-screenshot.png"}],
"storage": [
{"name":"numerals.app.js","url":"numerals.app.js"},
{"name":"numerals.img","url":"numerals-icon.js","evaluate":true},
@ -2119,13 +2151,14 @@
{
"id": "metronome",
"name": "Metronome",
"version": "0.06",
"version": "0.07",
"readme": "README.md",
"description": "Makes the watch blinking and vibrating with a given rate",
"icon": "metronome_icon.png",
"tags": "tool",
"supports": ["BANGLEJS"],
"readme": "README.md",
"supports": ["BANGLEJS","BANGLEJS2"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-metronome-screenshot.png"}],
"storage": [
{"name":"metronome.app.js","url":"metronome.js"},
{"name":"metronome.img","url":"metronome-icon.js","evaluate":true},
@ -2141,6 +2174,7 @@
"icon": "blackjack.png",
"tags": "game",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-black-jack-game-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"blackjack.app.js","url":"blackjack.app.js"},
@ -2174,6 +2208,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-SWL-clock-screenshot.png"}],
"storage": [
{"name":"swlclk.app.js","url":"app.js"},
{"name":"swlclk.img","url":"app-icon.js","evaluate":true}
@ -2251,6 +2286,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-pong-screenshot.png"}],
"storage": [
{"name":"pong.app.js","url":"app.js"},
{"name":"pong.img","url":"app-icon.js","evaluate":true}
@ -2313,6 +2349,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-large-clock-screenshot.png"}],
"storage": [
{"name":"largeclock.app.js","url":"largeclock.js"},
{"name":"largeclock.img","url":"largeclock-icon.js","evaluate":true},
@ -2364,6 +2401,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-timer-screenshot.png"}],
"storage": [
{"name":"simpletimer.app.js","url":"app.js"},
{"name":".tfnames","url":"gesture-tfnames.js","evaluate":true},
@ -2380,6 +2418,7 @@
"icon": "beebclock.png",
"type": "clock",
"tags": "clock",
"screenshots": [{"url":"bangle1-beeb-clock-screenshot.png"}],
"supports": ["BANGLEJS"],
"allow_emulator": true,
"storage": [
@ -2413,6 +2452,7 @@
"tags": "tools,health",
"supports": ["BANGLEJS"],
"readme": "README.md",
"screenshots": [{"url":"bangle1-get-up-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"getup.app.js","url":"app.js"},
@ -2491,6 +2531,7 @@
"version": "0.01",
"description": "La palla predice il futuro",
"icon": "app.png",
"screenshots": [{"url":"bangle1-magic-8-ball-italiano-screenshot.png"}],
"tags": "game",
"supports": ["BANGLEJS"],
"allow_emulator": true,
@ -2604,6 +2645,7 @@
"tags": "clock",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-vertical-watch-face-screenshot.png"}],
"storage": [
{"name":"verticalface.app.js","url":"app.js"},
{"name":"verticalface.img","url":"app-icon.js","evaluate":true}
@ -2631,6 +2673,7 @@
"icon": "life.png",
"tags": "game",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-game-of-life-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"life.app.js","url":"life.min.js"},
@ -2678,6 +2721,7 @@
"type": "clock",
"tags": "clock",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-mixed-clock-2-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"miclock2.app.js","url":"clock-mixed.js"},
@ -2813,6 +2857,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-CPR-assist-screenshot.png"}],
"storage": [
{"name":"cprassist.app.js","url":"cprassist.js"},
{"name":"cprassist.img","url":"cprassist-icon.js","evaluate":true},
@ -2856,6 +2901,7 @@
"icon": "counter_icon.png",
"tags": "tool",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-counter-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"counter.app.js","url":"counter.js"},
@ -3235,6 +3281,7 @@
"tags": "clock",
"supports": ["BANGLEJS"],
"readme": "README.md",
"screenshots": [{"url":"bangle1-lazy-clock-screenshot.png"}],
"allow_emulator": true,
"storage": [
{"name":"lazyclock.app.js","url":"lazyclock-app.js"},
@ -3336,6 +3383,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-slow-mo-clock-screenshot.png"}],
"storage": [
{"name":"slomoclock.app.js","url":"app.js"},
{"name":"slomoclock.img","url":"app-icon.js","evaluate":true},
@ -3675,6 +3723,7 @@
"icon": "battleship-icon.png",
"tags": "game",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-battle-ship-screenshot.png"}],
"readme": "README.md",
"allow_emulator": true,
"storage": [
@ -3878,6 +3927,7 @@
"type": "clock",
"tags": "clock",
"supports": ["BANGLEJS"],
"screenshots": [{"url":"bangle1-mystic-clock-screenshot.png"}],
"readme": "README.md",
"allow_emulator": true,
"storage": [
@ -3894,6 +3944,7 @@
"icon": "hcclock-icon.png",
"type": "clock",
"tags": "clock",
"screenshots": [{"url":"bangle1-high-contrast-clock-screenshot.png"}],
"supports": ["BANGLEJS"],
"allow_emulator": true,
"storage": [
@ -3975,6 +4026,7 @@
"tags": "clock",
"supports": ["BANGLEJS"],
"allow_emulator": true,
"screenshots": [{"url":"bangle1-vector-clock-screenshot.png"}],
"storage": [
{"name":"vectorclock.app.js","url":"app.js"},
{"name":"vectorclock.img","url":"app-icon.js","evaluate":true}
@ -4004,6 +4056,7 @@
"supports": ["BANGLEJS"],
"readme": "README.md",
"allow_emulator": true,
"screenshots": [{"url":"bangle1-choozi-screenshot1.png"},{"url":"bangle1-choozi-screenshot2.png"}],
"storage": [
{"name":"choozi.app.js","url":"app.js"},
{"name":"choozi.img","url":"app-icon.js","evaluate":true}
@ -4319,8 +4372,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}
]
},
@ -4357,7 +4412,7 @@
],
"data": [{"name":"authentiwatch.json"}]
},
{ "id": "schoolCalendar",
{ "id": "schoolCalendar",
"name": "School Calendar",
"shortName":"SCalendar",
"icon": "CalenderLogo.png",

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -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)

View File

@ -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();

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -26,3 +26,4 @@
0.22: Ensure Bangle.setGPSPower uses 'gpsrec' as a tag
0.23: Fix issue where tracks wouldn't record when running from OpenStMap if a period hadn't been set up first
0.24: Better support for Bangle.js 2, avoid widget area for Graphs, smooth graphs more
0.25: Fix issue where if Bangle.js 2 got a GPS fix but no reported time, errors could be caused by the widget (fix #935)

View File

@ -26,6 +26,7 @@
fixToggle = !fixToggle;
WIDGETS["gpsrec"].draw();
if (hasFix) {
if (fix.time===undefined) fix.time = new Date(); // Bangle.js 2 can provide a fix before time it seems
var period = fix.time.getTime() - lastFixTime;
if (period+500 > settings.period*1000) { // round up
lastFixTime = fix.time.getTime();

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -4,3 +4,4 @@
0.04: App shows instructions, Widgets remain visible, color changed
0.05: Buzz intensity and beats per bar can be changed via settings-app
0.06: Correct string position
0.07: Add support for Bangle.sjs2

View File

@ -4,11 +4,12 @@ This metronome makes your watch blink and vibrate with a given rate.
## Usage
* Tap the screen at least three times. The app calculates the mean rate of your tapping. This rate is displayed in bmp while the text blinks and the watch softly vibrates with every beat.
* Use `BTN1` to increase the bmp value by one.
* Use `BTN3` to decrease the bmp value by one.
* Tap the screen at least three times. The app calculates the mean rate of your tapping. This rate is displayed in bpm while the text blinks and the watch softly vibrates with every beat.
* Use `BTN1` to increase the bpm value by one.
* Use `BTN3` to decrease the bpm value by one.
* You can change the bpm value any time by tapping the screen or using `BTN1` and `BTN3`.
* Intensity of buzzing and the beats per bar (default 4) can be changed with the settings-app. The first beat per bar will be marked in red.
* On Bangle.js 2 tapping the center of the screen initiates bpm. in- or decreasing bpm can by 1 can be done by tapping left or right site of the screen.
## Attributions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -3,10 +3,9 @@ var cindex=0; // index to iterate through colous
var bpm=60; // ininital bpm value
var time_diffs = [1000, 1000, 1000]; //array to calculate mean bpm
var tindex=0; //index to iterate through time_diffs
Bangle.setLCDTimeout(undefined); //do not deaktivate display while running this app
// set background colour
g.setTheme({bg:"#000"});
Bangle.setLCDTimeout(undefined); //do not deactivate display while running this app
const storage = require("Storage");
const SETTINGS_FILE = 'metronome.settings.json';
@ -15,7 +14,7 @@ function setting(key) {
//define default settings
const DEFAULTS = {
'beatsperbar': 4,
'buzzintens': 0.75,
'buzzintens': 1.0,
};
if (!settings) { loadSettings(); }
return (key in settings) ? settings[key] : DEFAULTS[key];
@ -40,6 +39,10 @@ function changecolor() {
7: { value: 0xFFFF, name: "White" },
};
g.setColor(colors[cindex].value);
if ((process.env.HWVERSION==2 )) {
g.drawLine(39,0,39,g.getWidth()/3);
g.drawLine(136,0,136,g.getWidth()/3);
}
if (cindex == setting('beatsperbar')-1) {
cindex = 0;
}
@ -50,43 +53,73 @@ function changecolor() {
}
function updateScreen() {
g.reset().clearRect(0, 50, 250, 150);
g.reset().clearRect(0, 50, 250, 120);
changecolor();
try {
Bangle.buzz(50, setting('buzzintens'));
} catch(err) {
}
g.setFont("Vector",40).setFontAlign(0,0);
g.drawString(Math.floor(bpm)+"bpm", g.getWidth()/2, 100);
g.drawString(Math.floor(bpm)+"bpm", g.getWidth()/2, g.getWidth()/2);
}
Bangle.on('touch', function(button) {
// setting bpm by tapping the screen. Uses the mean time difference between several tappings.
if (tindex < time_diffs.length) {
if (Date.now()-tStart < 5000) {
time_diffs[tindex] = Date.now()-tStart;
}
} else {
tindex=0;
time_diffs[tindex] = Date.now()-tStart;
}
tindex += 1;
mean_time = 0.0;
for(count = 0; count < time_diffs.length; count++) {
mean_time += time_diffs[count];
}
time_diff = mean_time/count;
//Write user instructuins to screen
function printInstructions() {
g.clear(1).setFont("4x6");
g.setColor(-1); //set color to white
g.drawString('Drum the beat on the center\nof the screen to set tempo.', 30, g.getWidth()/3*2+15);
if(process.env.HWVERSION==1) {
g.drawString('Use BTN1 to increase, and\nBTN3 to decrease bpm value by 1.', 30, g.getWidth()/3*2+30);
}
else {
g.drawString('Touch left part of the screen\nto decrease, or the right site\nto increase bpm value by 1.', 30, g.getWidth()/3*2+30);
}
}
tStart = Date.now();
clearInterval(time_diff);
bpm = (60 * 1000/(time_diff));
updateScreen();
clearInterval(interval);
interval = setInterval(updateScreen, 60000 / bpm);
return bpm;
Bangle.on('touch', function(zone, e) {
// setting bpm by tapping the screen. Uses the mean time difference between several tappings.
if ((process.env.HWVERSION==2 && e.x > 39 && e.x < 136) || process.env.HWVERSION==1){
if (tindex < time_diffs.length) {
if (Date.now()-tStart < 5000) {
time_diffs[tindex] = Date.now()-tStart;
}
} else {
tindex=0;
time_diffs[tindex] = Date.now()-tStart;
}
tindex += 1;
mean_time = 0.0;
for (count = 0; count < time_diffs.length; count++) {
mean_time += time_diffs[count];
}
time_diff = mean_time/count;
tStart = Date.now();
clearInterval(time_diff);
bpm = (60 * 1000/(time_diff));
updateScreen();
clearInterval(interval);
interval = setInterval(updateScreen, 60000 / bpm);
return bpm;
}
else if (e.x < 39) {
if (bpm > 1) {
bpm -= 1;
clearInterval(interval);
interval = setInterval(updateScreen, 60000 / bpm);
}
}
else if (e.x > 136) {
if (bpm > 1) {
bpm += 1;
clearInterval(interval);
interval = setInterval(updateScreen, 60000 / bpm);
}}
});
// enable bpm finetuning via buttons.
// enable bpm finetuning
if ((process.env.HWVERSION==1)) {
setWatch(() => {
bpm += 1;
clearInterval(interval);
@ -101,10 +134,10 @@ setWatch(() => {
}
}, BTN3, {repeat:true});
}
interval = setInterval(updateScreen, 60000 / bpm);
printInstructions();
g.clear(1).setFont("6x8");
g.drawString('Touch the screen to set tempo.\nUse BTN1 to increase, and\nBTN3 to decrease bpm value by 1.', 25, 200);
Bangle.loadWidgets();
Bangle.drawWidgets();

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB