1
0
Fork 0

apgsdata - Switch gps off and resolve promise after wating for GPS chip to settle

master
Martin Boonk 2023-01-13 09:37:01 +01:00
parent 9fc7c99c9f
commit ab6538a3ef
1 changed files with 4 additions and 2 deletions

View File

@ -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);