Fixed hooking into signals
[gregoa/zavai.git] / zavai / gps.py
index 49a3a2690f6803e71f376a4eca88f9a97b289702..ff97253bd589c2d5f240bba2f14fbe298b09f142 100755 (executable)
@@ -118,26 +118,13 @@ class GPSPosition():
 
     def _start_listening(self):
         self.gps.request(self)
-
-        self.bus.add_signal_receiver(
-            self.on_position_changed, 'PositionChanged', 'org.freedesktop.Gypsy.Position',
-            'org.freesmartphone.ogpsd', '/org/freedesktop/Gypsy')
-
-        # TODO: find out how come sometimes these events are not sent
-        self.gps.bus.add_signal_receiver(
-            self.on_satellites_changed, 'SatellitesChanged', 'org.freedesktop.Gypsy.Satellite',
-            'org.freesmartphone.ogpsd', '/org/freedesktop/Gypsy')
         self.gps.bus.add_signal_receiver(
-            self.on_ubxdebug_packet, 'DebugPacket', 'org.freesmartphone.GPS.UBX',
+            self.on_position_changed, 'PositionChanged', 'org.freedesktop.Gypsy.Position',
             'org.freesmartphone.ogpsd', '/org/freedesktop/Gypsy')
-        self.debug_request()
 
     def _stop_listening(self):
         self.gps.bus.remove_signal_receiver(
-            self.on_satellites_changed, 'SatellitesChanged', 'org.freedesktop.Gypsy.Satellite',
-            'org.freesmartphone.ogpsd', '/org/freedesktop/Gypsy')
-        self.gps.bus.remove_signal_receiver(
-            self.on_ubxdebug_packet, 'DebugPacket', 'org.freesmartphone.GPS.UBX',
+            self.on_position_changed, 'PositionChanged', 'org.freedesktop.Gypsy.Position',
             'org.freesmartphone.ogpsd', '/org/freedesktop/Gypsy')
         self.gps.release(self)