only vibrate during work hours

pull/2138/head
Spencer Churchill 2022-09-22 15:29:59 -07:00
parent 2abad628ec
commit a1e6bae39f
1 changed files with 8 additions and 4 deletions

View File

@ -7,9 +7,13 @@ they don't interfere with currently-running apps */
const look = 20 * 1000; // 20 seconds const look = 20 * 1000; // 20 seconds
buzz = _ => { buzz = _ => {
Bangle.buzz().then(_ => { const d = new Date();
setTimeout(Bangle.buzz, look); // run from 8 AM - 5 PM
}); if (d >= 8 && d <= 17) {
Bangle.buzz().then(_ => {
setTimeout(Bangle.buzz, look);
});
}
}; };
// add widget // add widget
@ -21,4 +25,4 @@ they don't interfere with currently-running apps */
setInterval(WIDGETS.twenties.buzz, move); // buzz to stand / sit setInterval(WIDGETS.twenties.buzz, move); // buzz to stand / sit
})(); })();
// Bangle.drawWidgets(); // <-- for development only // Bangle.drawWidgets(); // <-- for development only