def setgps(self): # Start or stop the gps daemon if self.gpson==0: liblocation.gpsd_control_start(gpsd_control) self.gpsb.setText('Disconnect from\nthe GPS device') self.statuslabel.setText('Status: Connecting...') self.gpson=1 else: if self.doingtrack==1: self.stoptrack() liblocation.gpsd_control_stop(gpsd_control) self.gpsb.setText('Connect to the\nGPS device') self.statuslabel.setText('Status: Disconnected') self.gpson=0
def stop_location(self): print "GPS Maemo 4 stop_location" if self.stop_on_exit: liblocation.gpsd_control_stop(self.gpsd_control)