Handling state of rotation regardless event itself

pull/2773/head
kamilkrz 2023-05-25 11:26:03 +02:00
parent 367441b333
commit f8f4391439
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
(() => {
const chargingRotation = 0 | require('Storage').readJSON("chargerot.settings.json").rotate;
const defaultRotation = 0 | require('Storage').readJSON("setting.json").rotate;
if (Bangle.isCharging()) g.setRotation(chargingRotation&3,chargingRotation>>2).clear();
Bangle.on('charging', (charging) => {
if (charging) {
g.setRotation(chargingRotation&3,chargingRotation>>2).clear();