mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-24 04:11:13 +00:00
f965ac74f9
- Extract MAVLinkBridge + 3 private helpers to pymavlink_bridge.py (455 LOC) - Extract MockMAVConnection to mock_mavlink.py (30 LOC) - Replace core/mavlink.py with shim re-exporting all names including _confidence_to_fix_type, _eskf_to_gps_input, _unix_to_gps_time - Update components/mavlink_io/__init__.py with full public surface - 216 tests pass (regression floor maintained) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
932 B
Python
31 lines
932 B
Python
"""No-op MAVLink connection used in dev/CI (pymavlink absent).
|
|
|
|
Extracted from gps_denied/core/mavlink.py (Plan 01-06).
|
|
The legacy import path (gps_denied.core.mavlink) re-exports this class.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
class MockMAVConnection:
|
|
"""No-op MAVLink connection used when pymavlink is not installed."""
|
|
|
|
def __init__(self):
|
|
self._sent: list[dict] = []
|
|
self._rx_messages: list = []
|
|
|
|
def mav(self):
|
|
return self
|
|
|
|
def gps_input_send(self, *args, **kwargs) -> None: # noqa: D102
|
|
self._sent.append({"type": "GPS_INPUT", "args": args, "kwargs": kwargs})
|
|
|
|
def named_value_float_send(self, *args, **kwargs) -> None: # noqa: D102
|
|
self._sent.append({"type": "NAMED_VALUE_FLOAT", "args": args, "kwargs": kwargs})
|
|
|
|
def recv_match(self, type=None, blocking=False, timeout=0.1): # noqa: D102
|
|
return None
|
|
|
|
def close(self) -> None:
|
|
pass
|