Implement power cycling the GPS directly
[gregoa/zavai.git] / src / app_gps.vala
index e1b8f842c61761f4ed72368d9ba7441551de80dc..88d41f9eca67f5966320ea9f3b7a7f175fe34dad 100644 (file)
@@ -174,17 +174,12 @@ public class GPSStuck : Gtk.Button
 
        public void on_clicked()
        {
-               if (!happened)
-               {
-                       zavai.app.run_script(zavai.config.homedir + "/reset_gps");
+               zavai.gps.gps.power_cycle(happened);
+               happened = !happened;
+               if (happened)
                        label = "The GPS is stuck AGAIN";
-               }
                else
-               {
-                       zavai.app.run_script(zavai.config.homedir + "/reset_gps again");
                        label = "The GPS is stuck";
-               }
-               happened = !happened;
        }
 }