fix: add @JvmOverloads to KotlinUSBBridge.connect() for USB RNode#561
Merged
torlando-tech merged 1 commit intomainfrom Feb 25, 2026
Merged
fix: add @JvmOverloads to KotlinUSBBridge.connect() for USB RNode#561torlando-tech merged 1 commit intomainfrom
torlando-tech merged 1 commit intomainfrom
Conversation
Contributor
Greptile SummaryAdds Key changes:
Background: Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 98df838 |
…atibility The startIoManager parameter added for nRF52 DFU (PR #508) removed the 2-parameter Java overload that Python/Chaquopy callers depend on. Without @jvmoverloads, Kotlin only generates connect(int, int, boolean) — so rnode_interface.py's connect(device_id, 115200) call fails with NoSuchMethodError, silently preventing USB RNode interfaces from starting. Fixes #545 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9adc3e2 to
98df838
Compare
Owner
Author
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
@JvmOverloadstoKotlinUSBBridge.connect()so Chaquopy/Python callers can invoke it with 2 argumentsstartIoManagerparameter added in PR fix: nRF52 DFU flashing and frequency band detection #508 (nRF52 DFU) removed the 2-param Java overload thatrnode_interface.pydepends onconnect(device_id, 115200)throwsNoSuchMethodErrorRoot cause
Kotlin default parameters only generate overloads for Kotlin callers. Java/Chaquopy callers need
@JvmOverloadsto get bridge methods. In v0.8.9,connect(int, int)existed. In v0.8.10+, onlyconnect(int, int, boolean)exists — breaking the Python call.Test plan
startIoManager=falsefrom Kotlin)Fixes #545
🤖 Generated with Claude Code