2023-05-25 07:09:11 +00:00
|
|
|
(() => {
|
2023-08-03 17:11:45 +00:00
|
|
|
const chargingRotation = 0 | (require('Storage').readJSON("chargerot.settings.json",1)||{}).rotate;
|
2023-05-25 07:09:11 +00:00
|
|
|
const defaultRotation = 0 | require('Storage').readJSON("setting.json").rotate;
|
2023-05-25 09:26:03 +00:00
|
|
|
if (Bangle.isCharging()) g.setRotation(chargingRotation&3,chargingRotation>>2).clear();
|
2023-05-25 07:09:11 +00:00
|
|
|
Bangle.on('charging', (charging) => {
|
|
|
|
if (charging) {
|
|
|
|
g.setRotation(chargingRotation&3,chargingRotation>>2).clear();
|
|
|
|
Bangle.showClock();
|
|
|
|
} else {
|
|
|
|
g.setRotation(defaultRotation&3,defaultRotation>>2).clear();
|
|
|
|
Bangle.showClock();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})();
|