From 92aa63e7282e3b94bcb41d6bdc569b35035d0cf0 Mon Sep 17 00:00:00 2001 From: hanxudong159 <42986190+han-xudong@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:13:38 +0800 Subject: [PATCH] fix: support legacy devices without prodname (2.1.3) --- CHANGELOG.md | 6 ++++++ CMakeLists.txt | 2 +- CONTRIBUTING.md | 4 ++-- core/CMakeLists.txt | 2 +- core/SNAPSHOT.sha256 | 6 +++--- core/UPSTREAM | 4 ++-- core/src/detail/xml_config.cpp | 5 +++++ pixi.toml | 4 ++-- pyproject.toml | 2 +- tests/artifact/test_wheel.py | 2 +- tests/python/test_import.py | 2 +- 11 files changed, 25 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc20a5..e7fb40e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project are documented in this file. ## Unreleased +## 2.1.3 - 2026-10-27 + +### Fixed + +- Integrate netft-cpp 0.3.5 so legacy devices that omit `prodname` can connect using their valid calibration. Missing product names display as `ATI Net F/T`; required calibration and malformed-name checks remain enforced. + ## 2.1.2 - 2026-10-08 - Integrate netft-cpp 0.3.4's calibration and checked-time protections. diff --git a/CMakeLists.txt b/CMakeLists.txt index 6626d27..5b65329 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(pynetft VERSION 2.1.2 LANGUAGES CXX) +project(pynetft VERSION 2.1.3 LANGUAGES CXX) option(PYNETFT_BUILD_TESTING "Build pyNetFT native tests" OFF) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c617bfb..930423f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -131,10 +131,10 @@ All contributions are submitted under the [Apache License 2.0](https://github.co ### Current core candidate -The private snapshot uses the exact netft-cpp `v0.3.4` release commit `1ce68a08a9387d9a36d22c3c259e44533199c347`; `UPSTREAM` and its content manifest record that release identity. Update from a clean upstream checkout using: +The private snapshot uses the exact netft-cpp `v0.3.5` release commit `d2ea470267d9fb5dc4d1ee53b9ce268a831c60dc`; `UPSTREAM` and its content manifest record that release identity. Update from a clean upstream checkout using: ```sh -python tools/sync_core.py sync --source /path/to/netft-cpp --tag v0.3.4 +python tools/sync_core.py sync --source /path/to/netft-cpp --tag v0.3.5 python tools/sync_core.py verify ``` diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e7a6ce4..b32d726 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(netft VERSION 0.3.4 LANGUAGES CXX) +project(netft VERSION 0.3.5 LANGUAGES CXX) include(CTest) include(GNUInstallDirs) diff --git a/core/SNAPSHOT.sha256 b/core/SNAPSHOT.sha256 index 84f2eab..accb3cc 100644 --- a/core/SNAPSHOT.sha256 +++ b/core/SNAPSHOT.sha256 @@ -1,6 +1,6 @@ -b2329e8fa84798edb7ddf912d6ea79455bd8181d607b28ae94297e2f409398f4 CMakeLists.txt +060c3f1c319aafd3ec8c7ab13c39a17475e075a0c0b2b8a9df8c88705fe4556f CMakeLists.txt c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE -ce471ce02972730df08fb35bc3c3ea60346dc4e79f7780ad1d55126d1cb61395 UPSTREAM +5ab64fc39e6fef2199f4874feb1d42d5c19e0813f246f74c0cd4fbb8c63ba0d4 UPSTREAM 40701f04e67bb18052b6c8f1db60cf5d41baab09e5396f5a88c1eb14ad1a7139 cmake/netftConfig.cmake.in e4a52fe7c7e13de95a29bdbd688d295a4a8ddc1805276274b0c14d4092f7253d include/netft/client.hpp 4f7fb383da5456fd8477e1981f4ff3eba9b82ec3a98f3c395e7d482faf75c112 include/netft/discovery.hpp @@ -20,7 +20,7 @@ fe9034a4a32138c3469005a44a1fbd61cfe41df25207723635a22e8ed376dbf5 src/detail/seq 78098e0c98c84103653b7aa9e2baf689cde656b52e1e13873f7491aed7f35ff5 src/detail/udp_transport.hpp f6e7e14de70a366e3d25b139dee8f061cdfff4c5173c78b831e564125b81d4b2 src/detail/udp_transport_posix.cpp d48e67880a9c0db5f2c9b4045cc7caddb7fdfbb934cb676d25914c9cf2d5cfe5 src/detail/udp_transport_windows.cpp -95a05fe378b735b433ea10f438e9f5338120830e054b30ed11cd8db12d760cea src/detail/xml_config.cpp +68ccc1db7f8b7e9a86ce56ae64bbe841e08cc6342742bbb39b99306f3f345ed8 src/detail/xml_config.cpp f10ff61cd2cc645abca23a7abce37439273569c6fe139a4fb07041532edb908d src/detail/xml_config.hpp 5a25276d0307c6a341aaee525cc9a66f00cda06e30bd345716ff5ee17a57e3e7 src/discovery.cpp 2598c182a2322925c2d99e1d0bba3b57215e451ba1ecc8df6b108b885f089c1f src/status.cpp diff --git a/core/UPSTREAM b/core/UPSTREAM index a257e23..4c3407e 100644 --- a/core/UPSTREAM +++ b/core/UPSTREAM @@ -1,4 +1,4 @@ repository=https://github.com/netft/netft-cpp -tag=v0.3.4 -commit=1ce68a08a9387d9a36d22c3c259e44533199c347 +tag=v0.3.5 +commit=d2ea470267d9fb5dc4d1ee53b9ce268a831c60dc paths=CMakeLists.txt,LICENSE,cmake,include,src diff --git a/core/src/detail/xml_config.cpp b/core/src/detail/xml_config.cpp index dd40fef..48a3d0a 100644 --- a/core/src/detail/xml_config.cpp +++ b/core/src/detail/xml_config.cpp @@ -208,6 +208,11 @@ RequiredFields extract_required_fields(std::string_view xml) { } for (std::size_t index = 0; index < kRequiredTags.size(); ++index) { if (!seen[index]) { + // Legacy firmware may omit the display name; calibration fields remain mandatory. + if (index == 0) { + fields[index] = "ATI Net F/T"; + continue; + } throw DiscoveryError("sensor configuration field '" + std::string{kRequiredTags[index]} + "' must appear exactly once"); } diff --git a/pixi.toml b/pixi.toml index 9813b1e..589b777 100644 --- a/pixi.toml +++ b/pixi.toml @@ -68,6 +68,6 @@ check = { depends-on = [ "native-tidy", ] } wheel = "python -m build --sdist --wheel --no-isolation" -wheel-check = "python tools/check_wheel.py dist/pynetft-2.1.2-*.whl" -sdist-check = "python tools/check_sdist.py dist/pynetft-2.1.2.tar.gz" +wheel-check = "python tools/check_wheel.py dist/pynetft-2.1.3-*.whl" +sdist-check = "python tools/check_sdist.py dist/pynetft-2.1.3.tar.gz" hardware-test = "python tools/hardware_test.py" diff --git a/pyproject.toml b/pyproject.toml index 48fde5f..bf4a925 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "scikit_build_core.build" [project] name = "pynetft" -version = "2.1.2" +version = "2.1.3" description = "Python client for ATI Net F/T Ethernet force/torque sensors" readme = "README.md" requires-python = ">=3.10" diff --git a/tests/artifact/test_wheel.py b/tests/artifact/test_wheel.py index f740e71..8357240 100644 --- a/tests/artifact/test_wheel.py +++ b/tests/artifact/test_wheel.py @@ -24,7 +24,7 @@ def test_native_extension_and_type_marker_are_installed() -> None: import pynetft from pynetft import _native - assert pynetft.__version__ == "2.1.2" + assert pynetft.__version__ == "2.1.3" assert _native.__version__ == pynetft.__version__ assert resources.files("pynetft").joinpath("py.typed").is_file() diff --git a/tests/python/test_import.py b/tests/python/test_import.py index dd89128..b9aa9e6 100644 --- a/tests/python/test_import.py +++ b/tests/python/test_import.py @@ -5,7 +5,7 @@ def test_installed_version_and_native_module_agree() -> None: - assert pynetft.__version__ == "2.1.2" + assert pynetft.__version__ == "2.1.3" assert version("pynetft") == pynetft.__version__ assert _native.__version__ == pynetft.__version__