Sleep half a second with the GPS off, if it helps
authorEnrico Zini <enrico@enricozini.org>
Sun, 6 Sep 2009 19:52:34 +0000 (20:52 +0100)
committerEnrico Zini <enrico@enricozini.org>
Sun, 6 Sep 2009 19:52:34 +0000 (20:52 +0100)
src/gps.vala

index 0e5e30eb1916e811142e3b75193a36527c457a69..001236a08dbb3117b56e7ad2f0d0dfd511863481 100644 (file)
@@ -48,6 +48,7 @@ public class GPS: zavai.Service
     public void power_cycle(bool aggressive)
     {
         usage.SetResourcePolicy("GPS", "disabled");
     public void power_cycle(bool aggressive)
     {
         usage.SetResourcePolicy("GPS", "disabled");
+        Thread.usleep(500000);
         if (aggressive)
             // Sometimes the GPS crashes because its state contains something
             // that makes it crash, so we need to remove the saved state or it
         if (aggressive)
             // Sometimes the GPS crashes because its state contains something
             // that makes it crash, so we need to remove the saved state or it