drained: clearWatch() and turn off bluetooth

pull/2684/head
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("GPS");
forceOff("HRM"); forceOff("HRM");
NRF.disconnect();
NRF.sleep();
// events // events
Bangle.removeAllListeners(); Bangle.removeAllListeners();
clearWatch();
// UI // UI
Bangle.setOptions({ 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.** * @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: