33We launch the real supportproxy binary against a fresh keys.tdb that
44has KEY_FLAG_BINLOG (and optionally KEY_FLAG_TLOG) set on a test
55entry, drive synthetic REMOTE_LOG_DATA_BLOCK packets through the
6- user-side UDP port via pymavlink (using the ardupilotmega dialect),
6+ user-side UDP port via pymavlink (using the all dialect),
77and assert:
88
99 * a sessionN.bin file appears at the expected sparse-file path,
4747PORT_USER_PAIR = 17900 + _W * 4
4848PORT_ENG_PAIR = 17901 + _W * 4
4949
50- os .environ .setdefault ('MAVLINK_DIALECT' , 'ardupilotmega ' )
50+ os .environ .setdefault ('MAVLINK_DIALECT' , 'all ' )
5151os .environ .setdefault ('MAVLINK20' , '1' )
5252
5353
@@ -130,7 +130,7 @@ def _wait_for(predicate, timeout=5.0):
130130def _send_data_block (sock , dest , seqno , payload , sysid = 1 ):
131131 """Build + send a REMOTE_LOG_DATA_BLOCK from a fake vehicle.
132132 payload is padded/truncated to 200 bytes."""
133- from pymavlink .dialects .v20 import ardupilotmega as mav
133+ from pymavlink .dialects .v20 import all as mav
134134 mav_obj = mav .MAVLink (file = None , srcSystem = sysid , srcComponent = 1 )
135135 data = (payload + b'\x00 ' * 200 )[:200 ]
136136 msg = mav .MAVLink_remote_log_data_block_message (
@@ -145,7 +145,7 @@ def _send_system_time(sock, dest, time_boot_ms, sysid=1,
145145 """Send a SYSTEM_TIME from a fake autopilot. Default compid is
146146 MAV_COMP_ID_AUTOPILOT1 (= 1) — change it to simulate a camera or
147147 companion computer for filter tests."""
148- from pymavlink .dialects .v20 import ardupilotmega as mav
148+ from pymavlink .dialects .v20 import all as mav
149149 if compid is None :
150150 compid = mav .MAV_COMP_ID_AUTOPILOT1
151151 mav_obj = mav .MAVLink (file = None , srcSystem = sysid , srcComponent = compid )
@@ -158,7 +158,7 @@ def _send_system_time(sock, dest, time_boot_ms, sysid=1,
158158def _recv_block_statuses (sock , timeout = 2.0 ):
159159 """Drain incoming UDP packets, decode REMOTE_LOG_BLOCK_STATUS,
160160 return list of (seqno, status) seen within `timeout`."""
161- from pymavlink .dialects .v20 import ardupilotmega as mav
161+ from pymavlink .dialects .v20 import all as mav
162162 mav_obj = mav .MAVLink (file = None )
163163 sock .settimeout (0.1 )
164164 out = []
@@ -328,7 +328,7 @@ def test_proxy_sends_remote_log_start_when_idle(self, proxy_workdir):
328328 # has a chance to fire. A single quiet HEARTBEAT would
329329 # only trigger one tick before main_loop's idle-timeout
330330 # kicks in.
331- from pymavlink .dialects .v20 import ardupilotmega as mav
331+ from pymavlink .dialects .v20 import all as mav
332332 hb_mav = mav .MAVLink (file = None , srcSystem = 1 , srcComponent = 1 )
333333 hb_msg = mav .MAVLink_heartbeat_message (
334334 type = 0 , autopilot = 0 , base_mode = 0 , custom_mode = 0 ,
@@ -346,7 +346,7 @@ def test_proxy_sends_remote_log_start_when_idle(self, proxy_workdir):
346346 collected .append (data )
347347 except socket .timeout :
348348 pass
349- from pymavlink .dialects .v20 import ardupilotmega as mav2
349+ from pymavlink .dialects .v20 import all as mav2
350350 decoder = mav2 .MAVLink (file = None )
351351 start_seqnos = []
352352 for blob in collected :
@@ -613,7 +613,7 @@ def test_reboot_via_system_time_rotates(self, proxy_workdir):
613613 def test_reboot_ignored_from_camera_compid (self , proxy_workdir ):
614614 """A SYSTEM_TIME backward jump from a non-autopilot component
615615 (e.g. a camera) must NOT trigger rotation."""
616- from pymavlink .dialects .v20 import ardupilotmega as mav
616+ from pymavlink .dialects .v20 import all as mav
617617 _setup_db (proxy_workdir , PORT_USER , PORT_ENG , 'bintest' , 'bp' ,
618618 'binlog' )
619619 proc = _start_proxy (proxy_workdir , PORT_ENG )
@@ -694,7 +694,7 @@ def test_keepalive_start_after_first_block(self, proxy_workdir):
694694 """After streaming begins, the proxy keeps sending START at
695695 ~5 s cadence so a post-reboot vehicle resumes. Pre-fix the
696696 START emit stopped after the first DATA_BLOCK."""
697- from pymavlink .dialects .v20 import ardupilotmega as mav
697+ from pymavlink .dialects .v20 import all as mav
698698 _setup_db (proxy_workdir , PORT_USER , PORT_ENG , 'bintest' , 'bp' ,
699699 'binlog' )
700700 proc = _start_proxy (proxy_workdir , PORT_ENG )
0 commit comments