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

Method start

gps_manager.py:244–258  ·  view source on GitHub ↗

Start GPS reading thread.

(self)

Source from the content-addressed store, hash-verified

242 return path
243
244 # Stage 3: raw device nodes — covers USB serial, native UART, and Raspberry
245 # Pi serial ports (/dev/ttyAMA0, /dev/serial0) that have no by-id symlink.
246 candidates = []
247 for pattern in ('/dev/ttyACM*', '/dev/ttyUSB*', '/dev/ttyS[0-9]*', '/dev/ttyAMA*'):
248 candidates.extend(glob.glob(pattern))
249 for fixed in ('/dev/serial0', '/dev/serial1'):
250 if os.path.exists(fixed):
251 candidates.append(fixed)
252 seen = set()
253 for dev in sorted(candidates):
254 real = os.path.realpath(dev)
255 if dev in exclude or real in exclude or real in seen:
256 continue
257 seen.add(real)
258 if _probe_nmea(dev):
259 return dev
260
261 return None

Callers 3

attachMethod · 0.95
_start_gpsdMethod · 0.45
_start_serialMethod · 0.45

Calls 4

_start_gpsdMethod · 0.95
_start_serialMethod · 0.95
detect_gps_deviceFunction · 0.85
warningMethod · 0.80

Tested by

no test coverage detected