Skip to content

Commit a3258fc

Browse files
authored
Merge pull request #4261 from elfehr/angle-restore-orientation
[angles] Restore display orientation on exit
2 parents c041050 + 407ba1b commit a3258fc

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/angles/ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
0.01: New App!
22
0.02: Minor code improvements
3+
0.03: Restore screen orientation

apps/angles/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ Bangle.setUI({
4444
relativeTo = undefined;
4545
draw();
4646
}
47-
});
47+
});
48+
49+
// Restore the original screen rotation
50+
E.on('kill', function() {
51+
g.setRotation(0 | require('Storage').readJSON("setting.json").rotate);
52+
});

apps/angles/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "angles",
33
"name": "Angles (Spirit Level)",
44
"shortName": "Angles",
5-
"version": "0.02",
5+
"version": "0.03",
66
"author": "gfwilliams",
77
"description": "Shows Angle or Relative angle in degrees (Digital Protractor/Inclinometer). Place Bangle sideways against a surface with the button facing away for best readings.",
88
"icon": "icon.png",

0 commit comments

Comments
 (0)