Handling state of rotation regardless event itself
parent
367441b333
commit
f8f4391439
|
|
@ -1,6 +1,7 @@
|
||||||
(() => {
|
(() => {
|
||||||
const chargingRotation = 0 | require('Storage').readJSON("chargerot.settings.json").rotate;
|
const chargingRotation = 0 | require('Storage').readJSON("chargerot.settings.json").rotate;
|
||||||
const defaultRotation = 0 | require('Storage').readJSON("setting.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) => {
|
Bangle.on('charging', (charging) => {
|
||||||
if (charging) {
|
if (charging) {
|
||||||
g.setRotation(chargingRotation&3,chargingRotation>>2).clear();
|
g.setRotation(chargingRotation&3,chargingRotation>>2).clear();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue