Beispiel #1
0
 def _gpsfound(self, gpsConnection):
     log("GPS found")
     self.gpsConn = gpsConnection
     self.gpsConn.nmeaSentenceReceived.connect(self.parse_data)
     # self.gpsConn.stateChanged.connect(self.gpsStateChanged)
     self.isConnected = True
     QgsGPSConnectionRegistry.instance().registerConnection(self.gpsConn)
Beispiel #2
0
 def _gpsfound(self, gpsConnection):
     log("GPS found")
     self.gpsConn = gpsConnection
     self.gpsConn.nmeaSentenceReceived.connect(self.parse_data)
     # self.gpsConn.stateChanged.connect(self.gpsStateChanged)
     self.isConnected = True
     QgsGPSConnectionRegistry.instance().registerConnection(self.gpsConn)
Beispiel #3
0
    def disconnectGPS(self):
        if self.isConnected:
            self.gpsConn.stateChanged.disconnect(self.gpsStateChanged)
            self.gpsConn.close()

        log("GPS disconnect")
        self.isConnected = False
        self.postion = None
        QgsGPSConnectionRegistry.instance().unregisterConnection(self.gpsConn)
        self.gpsdisconnected.emit()
Beispiel #4
0
    def disconnectGPS(self):
        if self.isConnected:
            self.gpsConn.stateChanged.disconnect(self.gpsStateChanged)
            self.gpsConn.close()

        log("GPS disconnect")
        self.isConnected = False
        self.postion = None
        QgsGPSConnectionRegistry.instance().unregisterConnection(self.gpsConn)
        self.gpsdisconnected.emit()
Beispiel #5
0
 def gpsconnection(self):
     try:
         return QgsGPSConnectionRegistry.instance().connectionList()[0]
     except IndexError:
         return None
Beispiel #6
0
 def _gpsfound(self, gpsConnection):
     log("GPS found")
     self.gpsConn = gpsConnection
     self.gpsConn.stateChanged.connect(self.gpsStateChanged)
     self.isConnected = True
     QgsGPSConnectionRegistry.instance().registerConnection(self.gpsConn)
Beispiel #7
0
 def gpsconnection(self):
     try:
         return QgsGPSConnectionRegistry.instance().connectionList()[0]
     except IndexError:
         return None
Beispiel #8
0
 def _gpsfound(self, gpsConnection):
     log("GPS found")
     self.gpsConn = gpsConnection
     self.gpsConn.stateChanged.connect(self.gpsStateChanged)
     self.isConnected = True
     QgsGPSConnectionRegistry.instance().registerConnection(self.gpsConn)