First attempt at satellite monitor
[gregoa/zavai.git] / src / gps.vala
index a405a545045cc6339fd137d02d3260ecad20c758..a55fcbae31bbd018f7d30e07030e3442e9bbb785 100644 (file)
@@ -95,6 +95,9 @@ public class Monitor : zavai.Service
 
        dynamic DBus.Object ubx;
        dynamic DBus.Object time;
+
+    public signal void sat_info(PtrArray< HashTable<string, Value?> > data);
+
        /*
        string[] filters = { "NAV-STATUS", "NAV_SVINFO" };
 
@@ -113,6 +116,7 @@ public class Monitor : zavai.Service
                        "org.freesmartphone.ogpsd",
                        "/org/freedesktop/Gypsy",
                        "org.freesmartphone.GPS.UBX");
+        /*
                time = zavai.registry.sbus.get_object(
                        "org.freesmartphone.ogpsd",
                        "/org/freedesktop/Gypsy",
@@ -121,6 +125,7 @@ public class Monitor : zavai.Service
                zavai.log.info("SETSIG1");
                time.TimeChanged += timechanged;
                zavai.log.info("SETSIG2");
+         */
 
                zavai.log.info("DEBUG1");
                ubx.DebugPacket += on_ubxdebug_packet;
@@ -135,10 +140,12 @@ public class Monitor : zavai.Service
 */
        }
 
+/*
        protected void timechanged(dynamic DBus.Object pos, int t)
        {
                zavai.log.info("TIMECHANGED");
        }
+*/
 
 /*
        protected void debug_update() throws GLib.Error
@@ -228,6 +235,7 @@ public class Monitor : zavai.Service
                */
                //message("Size: %d", data.size());
 //         self.notify("satellites", clid, length, data)
+        sat_info(prova);
        }
 
        protected override void start()