Merge pull request #3385 from bobrippling/feat/chargestatus-buzz
chargingstatus: also buzz on disconnect from chargingmaster
commit
01d84a5334
|
|
@ -1,2 +1,3 @@
|
||||||
0.01: First release.
|
0.01: First release.
|
||||||
0.02: No functional changes, just moved codebase to Typescript.
|
0.02: No functional changes, just moved codebase to Typescript.
|
||||||
|
0.03: Also buzz on disconnect from charging
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "Charging Status",
|
"name": "Charging Status",
|
||||||
"shortName":"ChargingStatus",
|
"shortName":"ChargingStatus",
|
||||||
"icon": "widget.png",
|
"icon": "widget.png",
|
||||||
"version":"0.02",
|
"version":"0.03",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see the charging status at a glance, no matter which battery widget is being used.",
|
"description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see the charging status at a glance, no matter which battery widget is being used.",
|
||||||
"tags": "widget",
|
"tags": "widget",
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
widget.width = iconWidth;
|
widget.width = iconWidth;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Promise.resolve().then(function () { return require("buzz").pattern("..;"); });
|
||||||
widget.width = 0;
|
widget.width = 0;
|
||||||
}
|
}
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
Bangle.buzz();
|
Bangle.buzz();
|
||||||
widget.width = iconWidth;
|
widget.width = iconWidth;
|
||||||
} else {
|
} else {
|
||||||
|
Promise.resolve().then(() => require("buzz").pattern("..;"));
|
||||||
widget.width = 0;
|
widget.width = 0;
|
||||||
}
|
}
|
||||||
Bangle.drawWidgets(); // re-layout widgets
|
Bangle.drawWidgets(); // re-layout widgets
|
||||||
|
|
|
||||||
|
|
@ -10335,7 +10335,7 @@ interface PromiseConstructor {
|
||||||
* @returns {any} A new Promise
|
* @returns {any} A new Promise
|
||||||
* @url http://www.espruino.com/Reference#l_Promise_resolve
|
* @url http://www.espruino.com/Reference#l_Promise_resolve
|
||||||
*/
|
*/
|
||||||
resolve<T extends any>(promises: T): Promise<T>;
|
resolve<T extends any>(promises?: T): Promise<T>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a new promise that is already rejected (at idle it'll call `.catch`)
|
* Return a new promise that is already rejected (at idle it'll call `.catch`)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue