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 {
|
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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue