Repository navigation
feat: replace the C++ SDK with the serial transport implementation - #7
Merged
Merged
Conversation
This branch is a complete port of the litearm Python SDK over the raw serial framing protocol. It shares no git history with main, so it lands as a whole-tree replacement rather than as a patch on the existing SDK. Removed with the previous SDK: proto/litearm.proto, the codec, device, types and exceptions layers, tests/test_arm.cpp, test_arm_direct.cpp, test_codec.cpp, test_device.cpp, and docs/DEVELOPER_GUIDE.zh-CN.md. Preserved unchanged: LICENSE, .github/workflows/ci.yml, .github/workflows/release.yml, .releaserc.json, .markdownlint.json. .gitignore is the union of both files. Scope: 49 commands, 27 test binaries, 379 cases, verified against a 7-axis arm on firmware Litearm1.8.0-7J. Known deviation: docs/DEVELOPER_GUIDE.md and TROUBLESHOOTING.md are Chinese, where main keeps an English guide plus a .zh-CN variant. README.md follows the repository convention and is English.
Two things were wrong with the imported tree; both are fixed here.
AGENTS.md had been replaced with a Chinese rewrite. It is the
repository's rule file, so it is restored byte for byte from main and
no longer differs from it at all.
The remaining documents were Chinese, which the repository's
documentation standard (AGENTS.md, section 4) does not allow. These
are now English: docs/DEVELOPER_GUIDE.md, TROUBLESHOOTING.md,
UNVERIFIED_REGISTER.md and examples/README.md. The Chinese developer
guide is kept as docs/DEVELOPER_GUIDE.zh-CN.md, which matches the
existing README.md / README.zh-CN.md convention. Source comments stay
Chinese, following the upstream Python reference.
Also corrected along the way: the register's rotted README.md line
references, its TROUBLESHOOTING.md reference after that file changed
length, a table-of-contents entry that contradicted its own heading
("three hooks" against a heading saying "two hooks"; the body counts
two), and the decorative emoji the documentation standard asks to
avoid.
precheck_home_is_exempt_so_the_recovery_path_stays_open and precheck_does_not_reject_a_normal_motion_sequence called home(0.01), a 10 ms arrival window. The fake delivers nine status frames after CMD_HOME, so a 10 ms window only holds on an unloaded machine. Running the full suite under TSan made the first one fail with "not arrived, timed out 0.0s", while the same binary passed 10 out of 10 when run on its own. Both now use the default timeout, which is what every other call site in the suite uses. The assertions themselves are unchanged: the cases still check the exemption, not the arrival window.
|
🎉 This PR is included in version 0.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Replaces the protobuf-based C++ client SDK on
mainwith a complete port of the litearm Python SDK over the raw serial framing protocol (SOF0xA5, CRC16-CCITT-FALSE).The two trees share no git history, so this lands as a whole-tree replacement rather than as a patch on the existing SDK. This branch is parented on
mainatff66587specifically to make the change reviewable as a PR; the diff below is the replacement, and it is large by nature.Breaks consumers of the previous C++ SDK.
include/litearm/arm.hpp,protocol.hppandtransport.hppare rewritten in place, andcodec.hpp,device.hpp,types.hppandexceptions.hppare removed along withproto/litearm.proto. Any caller of the current SDK stops compiling. Under this repository's version policy the commit carries noBREAKING CHANGE:marker, so it publishes as a minor.AGENTS.mdis the repository's rule file and this branch does not modify it — it is byte-for-bytemain's. Neither does it changeLICENSE,.github/workflows/ci.yml,.github/workflows/release.yml,.releaserc.jsonor.markdownlint.json.Changes
include/litearm/(23 headers),src/(18 translation units),examples/(7 programs),tests/(27 binaries), plusbuild.sh,env.sh,run_example.shand the PowerShell equivalents.cmake/litearmConfig.cmake.in,cmake/litearm.pc.inandcmake/toolchain-aarch64-linux-gnu.cmakeforfind_package,pkg-configand aarch64 cross builds.TROUBLESHOOTING.mdandUNVERIFIED_REGISTER.md, the latter listing 22 inherited gaps each with afile:linereference and machine-checked bytests/test_register.cpp.README.md,docs/DEVELOPER_GUIDE.md,TROUBLESHOOTING.md,UNVERIFIED_REGISTER.mdandexamples/README.md. The Chinese developer guide is kept asdocs/DEVELOPER_GUIDE.zh-CN.md, matching the existingREADME.zh-CN.mdconvention. Source comments stay Chinese, following the upstream Python reference.proto/litearm.proto, the codec, device, types and exceptions layers,tests/test_arm.cpp,test_arm_direct.cpp,test_codec.cpp,test_device.cpp, anddocs/DEVELOPER_GUIDE.zh-CN.md(superseded by the port's own guide under that name)..gitignoreis the union of both files, so neither side's build artifacts become trackable.README.mdline references in the register, a table-of-contents entry that contradicted its own heading, and a load-sensitive 10 ms timeout in twotest_precheckcases.Testing
The suite was run on this branch after the commits and before the push:
test_protocol_syncis skipped, not passing. It cross-checks the protocol constants against the firmware sources, which sit behind Gitee enterprise permissions. The skip is pre-existing and unrelated to this change; it is recorded as item 15 inUNVERIFIED_REGISTER.md.--werroris this repository's baseline: the library compiles under-Wall -Wextrawith zero warnings.One real failure was found and fixed while preparing this branch. Under the full TSan run,
test_precheckfailed withnot arrived, timed out 0.0s; the cause was a 10 ms arrival window that only holds on an unloaded machine (the same binary passed 10 out of 10 standalone). The two cases now use the default timeout like every other call site. TSan also reports a large batch of data races and double-lock warnings here; those are documented inREADME.mdas false positives backed by runtime lock-discipline assertions, and they are unchanged by this branch.The hardware claims in the commit message come from a separate real-arm session on firmware
Litearm1.8.0-7J, reported in full in the accompanying verification report. They are not reproducible from CI, because the probes used are not committed.Issues
None. No issue is referenced and this PR closes nothing.