dronecot 2.3.8__tar.gz → 2.3.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dronecot-2.3.8/dronecot.egg-info → dronecot-2.3.9}/PKG-INFO +1 -1
- {dronecot-2.3.8 → dronecot-2.3.9/dronecot.egg-info}/PKG-INFO +1 -1
- dronecot-2.3.9/src/dronecot/VERSION +1 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/classes.py +14 -5
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_status.py +19 -0
- dronecot-2.3.8/src/dronecot/VERSION +0 -1
- {dronecot-2.3.8 → dronecot-2.3.9}/CHANGELOG.md +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/LICENSE +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/MANIFEST.in +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/README.md +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/dronecot.egg-info/SOURCES.txt +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/dronecot.egg-info/dependency_links.txt +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/dronecot.egg-info/entry_points.txt +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/dronecot.egg-info/requires.txt +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/dronecot.egg-info/top_level.txt +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/setup.cfg +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/setup.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/__init__.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/ble_capture.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/ble_parse.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/bluez_capture.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/commands.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/constants.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/dji_exceptions.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/dji_functions.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/dji_text_parser.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/functions.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/odid.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/open_drone_id.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/rid_normalize.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/rid_track.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/udp_rid.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/wifi_capture.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/src/dronecot/wifi_parse.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_adsb_vehicle.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_bluez_capture.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_dji_listener.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_functions.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_mavlink_identity.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_rid_normalize.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_rid_track.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_sensor_detail.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_serial_crlf.py +0 -0
- {dronecot-2.3.8 → dronecot-2.3.9}/tests/test_wifi_parse.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.3.9
|
|
@@ -118,11 +118,18 @@ class _CRLFNormalizingReceiver:
|
|
|
118
118
|
return self._normalizer.feed(self._receiver(size))
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
def make_status(app_name: str, version: str):
|
|
121
|
+
def make_status(app_name: str, version: str, path: Optional[str] = None):
|
|
122
122
|
"""Return a status writer, or a no-op if this pytak has none."""
|
|
123
123
|
if _StatusWriter is None:
|
|
124
124
|
return _NoStatus()
|
|
125
|
-
return _StatusWriter(app_name, version=version)
|
|
125
|
+
return _StatusWriter(app_name, path=path, version=version)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def make_worker_status(config):
|
|
129
|
+
"""Build the status writer for one independently managed instance."""
|
|
130
|
+
app_name = str(config.get("STATUS_APP", "dronecot") or "dronecot")
|
|
131
|
+
path = str(config.get("STATUS_PATH", "") or "") or None
|
|
132
|
+
return make_status(app_name, dronecot.__version__, path=path)
|
|
126
133
|
|
|
127
134
|
|
|
128
135
|
class SerialWorker(pytak.QueueWorker):
|
|
@@ -832,7 +839,7 @@ class RIDWorker(pytak.QueueWorker):
|
|
|
832
839
|
# every RF source (Wi-Fi, BLE, BlueZ, serial MAVLink, MQTT, UDP) funnels
|
|
833
840
|
# through here. Instrumenting the capture workers instead would give N
|
|
834
841
|
# writers racing on one path, and each would see only its own slice.
|
|
835
|
-
self.status =
|
|
842
|
+
self.status = make_worker_status(config)
|
|
836
843
|
|
|
837
844
|
def _tracked(self) -> int:
|
|
838
845
|
"""Number of transmitters the aggregator is currently holding."""
|
|
@@ -990,10 +997,12 @@ class RXMockWorker(pytak.RXWorker):
|
|
|
990
997
|
class DJIWorker(pytak.QueueWorker):
|
|
991
998
|
"""Process DJI Drone ID data from a net queue and emit CoT events."""
|
|
992
999
|
|
|
993
|
-
def __init__(
|
|
1000
|
+
def __init__(
|
|
1001
|
+
self, tx_queue: asyncio.Queue, config, net_queue: asyncio.Queue
|
|
1002
|
+
) -> None:
|
|
994
1003
|
super().__init__(tx_queue, config)
|
|
995
1004
|
self.net_queue = net_queue
|
|
996
|
-
self.status =
|
|
1005
|
+
self.status = make_worker_status(config)
|
|
997
1006
|
|
|
998
1007
|
async def handle_data(self, data) -> None:
|
|
999
1008
|
if not data:
|
|
@@ -330,3 +330,22 @@ class TestStatusDegradesVisibly:
|
|
|
330
330
|
if classes._StatusWriter is None:
|
|
331
331
|
pytest.skip("installed pytak has no StatusWriter")
|
|
332
332
|
assert not isinstance(classes.make_status("x", "0"), classes._NoStatus)
|
|
333
|
+
|
|
334
|
+
def test_instance_status_uses_configured_app_and_path(self, monkeypatch, tmp_path):
|
|
335
|
+
captured = {}
|
|
336
|
+
|
|
337
|
+
def fake_writer(app_name, *, path=None, version=None):
|
|
338
|
+
captured.update(app_name=app_name, path=path, version=version)
|
|
339
|
+
return object()
|
|
340
|
+
|
|
341
|
+
monkeypatch.setattr(classes, "_StatusWriter", fake_writer)
|
|
342
|
+
path = str(tmp_path / "status.json")
|
|
343
|
+
classes.make_worker_status(
|
|
344
|
+
{"STATUS_APP": "dronecot-dronescout", "STATUS_PATH": path}
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
assert captured == {
|
|
348
|
+
"app_name": "dronecot-dronescout",
|
|
349
|
+
"path": path,
|
|
350
|
+
"version": classes.dronecot.__version__,
|
|
351
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.3.8
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|