Repository navigation
V4.0.0 - #5
Merged
Merged
V4.0.0#5
Conversation
…re releases the port and restores the device
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
| d.ser = OneFrame() | ||
| frames = list(d.scan_raw_stream(1e8, 2e8, 4, count=1)) | ||
| assert len(frames) == 1 and d.ser.sent[-1] == "pause" | ||
| del acq |
| def set_sweep_cw(self, val: "int | float | str") -> "bytearray | None": ... | ||
|
|
||
| def pause(self) -> "bytearray | None": ... | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tsapython 4.0.0: the library identifies the connected tinySA and refuses what that model cannot do, reports device rejections as errors instead of returning the firmware's text, gates the RF output behind
set_output_allowed(True), and adds a 120 s default read timeout. Nothing is renamed or removed; several calls return different values than 3.x (see README "Upgrading to 4.0.0").Verified on a tinySA Ultra ZS405 running tinySA4_v1.4-252 (and v1.4-143 before the firmware update): probe script 0 differences from the firmware-source reading;
pytest -m hardware19 passed / 1 expected skip;pytest -m hardware_output5 passed with the output on into a 50 Ω load. Basic and Ultra+ profiles are from the firmware source.Closes #
Type of change
Highlights
_profiles.py):BASIC,ZS405,ZS406,ZS407; identification at connect viaversion/info/help; commands, words and ranges the model lacks are refused before sending.select_existing_device()now works;DeviceProfile/PROFILESexported._identify.py):usage:,name?,usb disk mode active,Command timeoutreturn the error value.get_last_status()reports how the last command ended, so the defaultb''return is no longer ambiguous.setup_generator()/set_generator(), which pause the sweep around settings and check each step's status.output/modulation/caloutput/leveloffsetis dropped by the firmware and answeredCommand timeout20 s later. The library settles 0.4 s after those setters, treatsCommand timeoutas end-of-reply, and resends idempotent setters once.scanrawframes fail instead of returning partial data;sd_readtext replies no longer read as a length;connect()/disconnect()release the port.scan_raw_stream()(device-side continuous scan), serial read timeout, firmware floor v1.4-182,DeprecationWarningon the three deprecated aliases, numpy moved to theplottingextra (library depends on pyserial only), Python 3.14 in the matrix.FakePortnow flushes on reset and delivers replies in chunks; boundary tests for every reader.hardwareandhardware_outputmarkers (the latter also needsTSAPYTHON_OUTPUT_OK=1).uv sync --locked, twine check, wheel + sdist install smoke tests, examples compile check;build-release.ymlattaches a tag's files to a draft release andrelease.ymlpublishes those same files to PyPI. Issue/PR templates updated for 4.0.0.How it was tested
uv run pytestpasses (669 passed, 15 skipped, 5 deselected)uv run ruff check .passesuv run mypypassesuv run pytest -m hardware— 19 passed, 1 skipped (ZS405, tinySA4_v1.4-252-g2b4aa51)TSAPYTHON_OUTPUT_OK=1 uv run pytest -m hardware_output— 5 passed, 50 Ω load on the RF portNotes for reviewers
CHANGELOG
[4.0.0], README "Upgrading to 4.0.0", "Device Profiles", "RF Output Setting", "Firmware Compatibility" and CONTRIBUTING describe the design. Not in this PR: measuring the generator output with a receiver (tests/bench_generator.pyis the script for that session) and the web UI's 4.0.0 update, both of which follow the release.