Revert "update0005"

This reverts commit 4ceb67f2b2.
pull/423/head
Michael Bengfort 2020-05-15 13:47:55 +02:00
parent 4ceb67f2b2
commit afa6d0dc3a
5 changed files with 13 additions and 24 deletions

View File

@ -1403,7 +1403,7 @@
"id": "metronome",
"name": "Metronome",
"icon": "metronome_icon.png",
"version": "0.05",
"version": "0.04",
"readme": "README.md",
"description": "Makes the watch blinking and vibrating with a given rate",
"tags": "tool",
@ -1417,8 +1417,7 @@
"name": "metronome.img",
"url": "metronome-icon.js",
"evaluate": true
},
{"name":"metronome.settings.js","url":"settings.js"}
}
]
},
{ "id": "blackjack",

View File

@ -2,4 +2,3 @@
0.02: Watch vibrates with every beat
0.03: Uses mean of three time intervalls to calculate bmp
0.04: App shows instructions, Widgets remain visible, color changed
0.05: Buzz intensity and beats per bar can be changed via settings-app

View File

@ -8,7 +8,6 @@ This metronome makes your watch blink and vibrate with a given rate.
* Use `BTN1` to increase the bmp value by one.
* Use `BTN3` to decrease the bmp 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.
## Attributions

View File

@ -14,7 +14,6 @@ function setting(key) {
//define default settings
const DEFAULTS = {
'beatsperbar': 4,
'buzzintens': 0.75,
};
if (!settings) { loadSettings(); }
return (key in settings) ? settings[key] : DEFAULTS[key];
@ -29,14 +28,15 @@ function loadSettings() {
function changecolor() {
const colors = {
0: { value: 0xF800, name: "Red" },
1: { value: 0xFFFF, name: "White" },
2: { value: 0x9492, name: "gray" },
3: { value: 0xFFFF, name: "White" },
4: { value: 0x9492, name: "gray" },
5: { value: 0xFFFF, name: "White" },
6: { value: 0x9492, name: "gray" },
0: { value: 0xF800, name: "Red" },
1: { value: 0xFFFF, name: "White" },
2: { value: 0x03E0, name: "DarkGreen" },
3: { value: 0xFFFF, name: "White" },
4: { value: 0x03E0, name: "DarkGreen" },
5: { value: 0xFFFF, name: "White" },
6: { value: 0x03E0, name: "DarkGreen" },
7: { value: 0xFFFF, name: "White" },
8: { value: 0x03E0, name: "DarkGreen" },
};
g.setColor(colors[cindex].value);
if (cindex == setting('beatsperbar')-1) {
@ -52,7 +52,7 @@ function updateScreen() {
g.clearRect(0, 50, 250, 150);
changecolor();
try {
Bangle.buzz(50, setting('buzzintens'));
Bangle.buzz(50, 0.75);
}
catch(err) {
}

View File

@ -8,7 +8,6 @@
// initialize with default settings...
let s = {
'beatsperbar': 4,
'buzzintens': 0.75,
};
// ...and overwrite them with any saved values
// This way saved values are preserved if a new version adds more settings
@ -36,13 +35,6 @@
step: 1,
onchange: save('beatsperbar'),
},
'buzz intensity': {
value: s.buzzintens,
min: 0.0,
max: 1.0,
step: 0.25,
onchange: save('buzzintens'),
},
};
E.showMenu(menu);
});