mirror of https://github.com/espruino/BangleApps
drained: clearWatch() and turn off bluetooth
parent
9c643f6b5d
commit
923b5dbb96
|
@ -21,9 +21,12 @@ const forceOff = (name: "GPS" | "HRM" | "Compass" /*| "Barom"*/) => {
|
||||||
};
|
};
|
||||||
forceOff("GPS");
|
forceOff("GPS");
|
||||||
forceOff("HRM");
|
forceOff("HRM");
|
||||||
|
NRF.disconnect();
|
||||||
|
NRF.sleep();
|
||||||
|
|
||||||
// events
|
// events
|
||||||
Bangle.removeAllListeners();
|
Bangle.removeAllListeners();
|
||||||
|
clearWatch();
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
Bangle.setOptions({
|
Bangle.setOptions({
|
||||||
|
|
|
@ -11450,7 +11450,7 @@ declare function setWatch(func: ((arg: { state: boolean, time: number, lastTime:
|
||||||
* @param {any} id - The id returned by a previous call to setWatch. **Only one argument is allowed.**
|
* @param {any} id - The id returned by a previous call to setWatch. **Only one argument is allowed.**
|
||||||
* @url http://www.espruino.com/Reference#l__global_clearWatch
|
* @url http://www.espruino.com/Reference#l__global_clearWatch
|
||||||
*/
|
*/
|
||||||
declare function clearWatch(id: number): void;
|
declare function clearWatch(id?: number): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A variable containing the arguments given to the function:
|
* A variable containing the arguments given to the function:
|
||||||
|
|
Loading…
Reference in New Issue