MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / detach

Method detach

gps_manager.py:340–348  ·  view source on GitHub ↗

Release the current GPS device — called when it is unplugged so the monitor can re-attach a fresh one later.

(self)

Source from the content-addressed store, hash-verified

338 logger.warning(self.error)
339 return False
340
341 if self.port == 'gpsd':
342 return self._start_gpsd()
343 return self._start_serial()
344
345 def _start_gpsd(self):
346 sock = _try_gpsd()
347 if not sock:
348 self.error = "gpsd not reachable on localhost:2947"
349 logger.error(self.error)
350 return False
351 self._gpsd_sock = sock

Callers 1

_detach_deviceMethod · 0.80

Calls 2

stopMethod · 0.95
infoMethod · 0.80

Tested by

no test coverage detected