mirror of https://github.com/espruino/BangleApps
remove testing code
parent
686e0cd091
commit
d45c91aa4e
Binary file not shown.
|
@ -7,7 +7,7 @@ function updateSettings() {
|
||||||
|
|
||||||
function resetSettings() {
|
function resetSettings() {
|
||||||
settings = {
|
settings = {
|
||||||
interval: 60,
|
interval: 3600,
|
||||||
start: 9,
|
start: 9,
|
||||||
end: 21,
|
end: 21,
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ function showMainMenu() {
|
||||||
const mainmenu = {
|
const mainmenu = {
|
||||||
'': { 'title': 'Hour Strike' },
|
'': { 'title': 'Hour Strike' },
|
||||||
'Mode': {
|
'Mode': {
|
||||||
value: mode_interval.indexOf(settings.interval),
|
value: 1 | mode_interval.indexOf(settings.interval),
|
||||||
min: 0, max: 3,
|
min: 0, max: 3,
|
||||||
format: v => mode_txt[v],
|
format: v => mode_txt[v],
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
|
|
|
@ -3,7 +3,5 @@
|
||||||
var cur = new Date();
|
var cur = new Date();
|
||||||
var cur_sec = cur.getMinutes()*60+cur.getSeconds();
|
var cur_sec = cur.getMinutes()*60+cur.getSeconds();
|
||||||
var notify_sec = setting.interval>0?setting.interval-setting.interval%cur_sec:-1;
|
var notify_sec = setting.interval>0?setting.interval-setting.interval%cur_sec:-1;
|
||||||
Bangle.buzz();
|
|
||||||
console.log(notify_sec);
|
|
||||||
if (notify_sec>0) setTimeout(load('hourstrike.js'), notify_sec*1000);
|
if (notify_sec>0) setTimeout(load('hourstrike.js'), notify_sec*1000);
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -15,8 +15,6 @@ if (cur_hour<setting.start) {
|
||||||
wait_sec = 0;
|
wait_sec = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(wait_sec);
|
|
||||||
|
|
||||||
var notify_func = function () {
|
var notify_func = function () {
|
||||||
Bangle.buzz(200, 0.5)
|
Bangle.buzz(200, 0.5)
|
||||||
.then(() => new Promise(resolve => setTimeout(resolve,200)))
|
.then(() => new Promise(resolve => setTimeout(resolve,200)))
|
||||||
|
|
Loading…
Reference in New Issue