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 { try {
writeChunks(atob(b64), ()=>{ writeChunks(atob(b64), ()=>{
Bangle.setGPSPower(0,"agpsdata"); setTimeout(()=>{
resolve(); Bangle.setGPSPower(0,"agpsdata");
resolve();
}, 1000);
}); });
} catch (e) { } catch (e) {
console.log("error:", e); console.log("error:", e);