forked from FOSS/BangleApps
apgsdata - Switch gps off and resolve promise after wating for GPS chip to settle
parent
9fc7c99c9f
commit
ab6538a3ef
|
@ -20,8 +20,10 @@ function setAGPS(b64) {
|
|||
|
||||
try {
|
||||
writeChunks(atob(b64), ()=>{
|
||||
Bangle.setGPSPower(0,"agpsdata");
|
||||
resolve();
|
||||
setTimeout(()=>{
|
||||
Bangle.setGPSPower(0,"agpsdata");
|
||||
resolve();
|
||||
}, 1000);
|
||||
});
|
||||
} catch (e) {
|
||||
console.log("error:", e);
|
||||
|
|
Loading…
Reference in New Issue