1
0
Fork 0

drained: clearWatch() and turn off bluetooth

master
Rob Pilling 2023-04-08 08:25:54 +01:00
parent 9c643f6b5d
commit 923b5dbb96
2 changed files with 4 additions and 1 deletions

View File

@ -21,9 +21,12 @@ const forceOff = (name: "GPS" | "HRM" | "Compass" /*| "Barom"*/) => {
};
forceOff("GPS");
forceOff("HRM");
NRF.disconnect();
NRF.sleep();
// events
Bangle.removeAllListeners();
clearWatch();
// UI
Bangle.setOptions({

View File

@ -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.**
* @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: