(iface_local)
| 2440 | gps_port = self._gps.port if self._gps else None |
| 2441 | if gps_port and port == gps_port: |
| 2442 | return {'error': f'Port {port} is already in use by GPS'} |
| 2443 | companion = self._start_companion_thread(port) |
| 2444 | if companion is None: |
| 2445 | return {'error': f'Could not start companion on {port}'} |
| 2446 | return {'success': True, 'port': port} |
| 2447 | |
| 2448 | def stop_serial(self, port: str | None = None): |
| 2449 | """Stop one companion (by port) or all companions.""" |
| 2450 | if port: |
| 2451 | c = self._companions.pop(port, None) |
| 2452 | if c: |
nothing calls this directly
no test coverage detected