forked from FOSS/BangleApps
parent
5630b85918
commit
14787e495c
|
@ -4,3 +4,15 @@ apps/gipy/pkg/gps.js
|
||||||
|
|
||||||
# Needs to be ignored because it includes broken JS
|
# Needs to be ignored because it includes broken JS
|
||||||
apps/health/chart.min.js
|
apps/health/chart.min.js
|
||||||
|
|
||||||
|
# TypeScript
|
||||||
|
apps/btadv/
|
||||||
|
apps/clkinfostopw/
|
||||||
|
apps/ctrlpad/
|
||||||
|
apps/drained/
|
||||||
|
apps/folderlaunch/
|
||||||
|
apps/popconlaunch/
|
||||||
|
apps/rep/
|
||||||
|
apps/widChargingStatus/
|
||||||
|
apps/widbtstates/
|
||||||
|
apps/widhid/
|
||||||
|
|
|
@ -126,9 +126,8 @@
|
||||||
{
|
{
|
||||||
text: "DnD",
|
text: "DnD",
|
||||||
cb: function (tap) {
|
cb: function (tap) {
|
||||||
var on = false;
|
var on;
|
||||||
if (origBuzz) {
|
if (on = !!origBuzz) {
|
||||||
on = true;
|
|
||||||
if (tap) {
|
if (tap) {
|
||||||
Bangle.buzz = origBuzz;
|
Bangle.buzz = origBuzz;
|
||||||
origBuzz = undefined;
|
origBuzz = undefined;
|
||||||
|
|
|
@ -193,9 +193,8 @@
|
||||||
{
|
{
|
||||||
text: "DnD",
|
text: "DnD",
|
||||||
cb: tap => {
|
cb: tap => {
|
||||||
let on = false;
|
let on;
|
||||||
if(origBuzz){
|
if(on = !!origBuzz){
|
||||||
on = true;
|
|
||||||
if(tap){
|
if(tap){
|
||||||
Bangle.buzz = origBuzz;
|
Bangle.buzz = origBuzz;
|
||||||
origBuzz = undefined;
|
origBuzz = undefined;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
var app = "drained";
|
var app = "drained";
|
||||||
var globals = global;
|
if (typeof drainedInterval !== "undefined")
|
||||||
if (typeof globals.drainedInterval !== "undefined")
|
drainedInterval = clearInterval(drainedInterval);
|
||||||
globals.drainedInterval = clearInterval(globals.drainedInterval);
|
|
||||||
Bangle.setLCDBrightness(0);
|
Bangle.setLCDBrightness(0);
|
||||||
var powerNoop = function () { return false; };
|
var powerNoop = function () { return false; };
|
||||||
var forceOff = function (name) {
|
var forceOff = function (name) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const app = "drained";
|
const app = "drained";
|
||||||
|
|
||||||
// from boot.js
|
// from boot.js
|
||||||
const globals: { drainedInterval: IntervalId | undefined } = global as any;
|
declare var drainedInterval: IntervalId | undefined;
|
||||||
if(typeof globals.drainedInterval !== "undefined")
|
if(typeof drainedInterval !== "undefined")
|
||||||
globals.drainedInterval = clearInterval(globals.drainedInterval) as undefined;
|
drainedInterval = clearInterval(drainedInterval) as undefined;
|
||||||
|
|
||||||
// backlight
|
// backlight
|
||||||
Bangle.setLCDBrightness(0);
|
Bangle.setLCDBrightness(0);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(function () {
|
(function () {
|
||||||
var _a = require("Storage").readJSON("drained.setting.json", true) || {}, _b = _a.battery, threshold = _b === void 0 ? 5 : _b, _c = _a.interval, interval = _c === void 0 ? 10 : _c, _d = _a.keepStartup, keepStartup = _d === void 0 ? true : _d;
|
var _a = require("Storage").readJSON("drained.setting.json", true) || {}, _b = _a.battery, threshold = _b === void 0 ? 5 : _b, _c = _a.interval, interval = _c === void 0 ? 10 : _c, _d = _a.keepStartup, keepStartup = _d === void 0 ? true : _d;
|
||||||
global.drainedInterval = setInterval(function () {
|
drainedInterval = setInterval(function () {
|
||||||
if (Bangle.isCharging())
|
if (Bangle.isCharging())
|
||||||
return;
|
return;
|
||||||
if (E.getBattery() > threshold)
|
if (E.getBattery() > threshold)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
const { battery: threshold = 5, interval = 10, keepStartup = true }: DrainedSettings
|
const { battery: threshold = 5, interval = 10, keepStartup = true }: DrainedSettings
|
||||||
= require("Storage").readJSON(`drained.setting.json`, true) || {};
|
= require("Storage").readJSON(`drained.setting.json`, true) || {};
|
||||||
|
|
||||||
(global as any).drainedInterval = setInterval(() => {
|
drainedInterval = setInterval(() => {
|
||||||
if(Bangle.isCharging())
|
if(Bangle.isCharging())
|
||||||
return;
|
return;
|
||||||
if(E.getBattery() > threshold)
|
if(E.getBattery() > threshold)
|
||||||
|
|
|
@ -1137,6 +1137,18 @@ module.exports = {
|
||||||
"no-undef"
|
"no-undef"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"drained/boot.js": {
|
||||||
|
"hash": "914ea2c47aa6b9502b9dd354d490b2a8b838d4c6fafaa20e206f1f2396d4db40",
|
||||||
|
"rules": [
|
||||||
|
"no-undef"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"drained/app.js": {
|
||||||
|
"hash": "2b609ca5bf414b0e400e25512bf396a01f8cb0365b4edd02ea1697b51907d36c",
|
||||||
|
"rules": [
|
||||||
|
"no-undef"
|
||||||
|
]
|
||||||
|
},
|
||||||
"dinoClock/app.js": {
|
"dinoClock/app.js": {
|
||||||
"hash": "e97566aa4f586ef654e3fc1ec286376352762ed8e0ea2e685a7b3ae687f51552",
|
"hash": "e97566aa4f586ef654e3fc1ec286376352762ed8e0ea2e685a7b3ae687f51552",
|
||||||
"rules": [
|
"rules": [
|
||||||
|
|
Loading…
Reference in New Issue