Skip to content

Merge dev into master for XRobot 1.0 - #7

Merged
Jiu-xiao merged 13 commits into
masterfrom
dev
Oct 4, 2026
Merged

Jiu-xiao merged 13 commits into
masterfrom
dev

Conversation

@Jiu-xiao

@Jiu-xiao Jiu-xiao commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

把 dev 合入 master。迁移到 XRobot 1.0 的模块约定(静态装配),具体改动见下方提交列表。

Merges dev into master. Migrates the Module to the XRobot 1.0 conventions (static assembly); the commits below list the changes.

合并顺序:libxr、CodeGenerator、扩展和 XRobot 先合并并发布(xrobot 1.0.0、libxr 6.0.0、扩展 2.0.0,XRobot 打 v1);模块的 PR 在 xrobot 1.0.0 发布之后再合并,因为模块 master 合入后,xrobot 0.3.x 拉到的就是 MODULE MANIFEST V2 的模块。

Merge order: libxr, CodeGenerator, the extension and XRobot are merged and released first (xrobot 1.0.0, libxr 6.0.0, extension 2.0.0, XRobot tag v1); the Module PRs follow after xrobot 1.0.0 is released, because once a Module's master carries MODULE MANIFEST V2, xrobot 0.3.x fetches that format.

验证 / Verification

  • dev 上的 Module CI 通过(2026-10-03,XRobot dev ac729b0d、LibXR dev 585b59f)。

提交 / Commits

  • feat: adopt static module construction (cc9e040)
  • Migrate to static assembly (1c5d445)
  • Merge origin/master into feat/static-assembly-20260915 (51a8fc6)
  • Remove unsupported module_name manifest key (cd2f153)
  • Remove the empty OnMonitor hook (95da540)
  • Add the Apache-2.0 license (8d0876d)
  • Use the shared XRobot Module CI workflow (837537e)
  • Rewrite the README for XRobot 1.0 (9275324)

Summary by Sourcery

Migrate the DR16 module to XRobot 1.0 conventions and shared CI while updating its manifest, construction API, and user documentation.

New Features:

  • Migrate the DR16 module to the XRobot 1.0 static-construction model with explicit UART, CMD, and configuration parameters.
  • Adopt Module Manifest V2 metadata describing the CMD dependency and modern instance configuration.
  • Document the DR16 module’s XRobot 1.0 interface, data mapping, events, dependencies, and configuration in bilingual README content.

Enhancements:

  • Remove the legacy application-manager integration and empty monitoring hook from the DR16 module.
  • Improve API and inline documentation for DR16 parsing, events, configuration, and offline handling.
  • Add an Apache-2.0 license.

CI:

  • Replace the custom module build workflow with the shared XRobot Module CI workflow.

Documentation:

  • Rewrite the README for the XRobot 1.0 module conventions and usage.

Merged master commits and verdicts:
- 590aec6 fix: validate CMD provider before receiver setup
  superseded: the static-assembly constructor takes LibXR::UART& and CMD&
  (non-null by type, no hardware-container lookup, no pointer/reference
  overload pair); the manifest already declares QDU-Robomaster/CMD.

Conflicts resolved in favour of the static-assembly branch.
XRobot accepts only module_description, description, depends and standalone in the module manifest.
The static-assembly entry calls OnMonitor() only for modules that declare it; the empty body was left over from the removed application framework.
The XRobot ecosystem Modules are published under the Apache License 2.0; the text
is identical to xrobot-org/XRobot/LICENSE.
Replace the generated inline workflow with a caller of
xrobot-org/XRobot/.github/workflows/module-ci.yml, which resolves the
dependencies, compiles the Module sources and a generated constructor probe
against LibXR.

During the coordinated 1.0 change the tools, LibXR and same-or-dev dependencies
come from dev.
Describe the Module, its dependencies, its constructor (dependencies first, then
the value configuration) and its use with xrobot module add / setup / instance
add, with a configuration example seeded by the tool. Drop the dynamic-framework
text and the dead MIGRATION.md link.
@sourcery-ai

sourcery-ai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Migrates the DR16 module to XRobot 1.0’s static assembly and MODULE MANIFEST V2 conventions, updates construction and dependency metadata, adopts the shared dev-branch Module CI workflow, and rewrites usage documentation with an Apache-2.0 license.

File-Level Changes

Change Details Files
Migrate the DR16 module from runtime application registration to XRobot 1.0 static construction.
  • Replace the V1 manifest with MODULE MANIFEST V2 and declare the CMD repository dependency.
  • Change construction to accept registered UART and CMD references plus a configurable Param value.
  • Remove LibXR::Application inheritance, ApplicationManager registration, hardware lookup, and the empty monitor hook.
  • Preserve DR16 parsing, event generation, offline handling, and CMD feeding under the new ownership model.
DR16.hpp
Replace the repository-specific build test with the shared XRobot Module CI workflow.
  • Invoke the reusable Module CI workflow from XRobot.
  • Pin CI verification inputs to the dev branches of XRobot, libxr, and dependencies.
  • Add manual workflow dispatch while removing local setup, module generation, build, and automatic tag creation steps.
.github/workflows/build.yml
Update module documentation for XRobot 1.0 static assembly and usage.
  • Document runtime behavior, event IDs, constructor parameters, dependencies, and hardware registration requirements.
  • Provide the new xrobot module/instance commands and generated YAML example.
  • Describe module ordering and regenerated xrobot_main.hpp requirements.
README.md
Add project licensing.
  • Add the Apache-2.0 license text.
LICENSE

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="DR16.hpp" line_range="147-149" />
<code_context>
+  DR16(
</code_context>
<issue_to_address>
**nitpick:** The constructor documentation still advertises a nonexistent `cmd_data_tp_name` parameter and omits the required `uart` parameter, so the in-code API documentation does not describe the static-assembly constructor that callers must use.

**Suggested fix:** Update the constructor comment to document `uart`, `cmd`, and `param`, and remove the stale `cmd_data_tp_name` entry.

```suggestion
   * @param uart UART对象引用
   * @param cmd 控制命令对象引用
   * @param param Value configuration.
```
</issue_to_address>

Sourcery assessment

Needs a human reviewer. The new DR16 integration directly feeds parsed UART input into CMD, so a wrong mapping, constructor wiring, or offline transition could issue incorrect robot-control commands. Reverting prevents future commands but cannot undo physical actions that occurred while the faulty code was running.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread DR16.hpp Outdated
Comment on lines 147 to 149
* @param cmd 控制命令对象引用
* @param task_stack_depth_uart UART任务栈深度
* @param param Value configuration.
* @param cmd_data_tp_name CMD数据主题名称

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: The constructor documentation still advertises a nonexistent cmd_data_tp_name parameter and omits the required uart parameter, so the in-code API documentation does not describe the static-assembly constructor that callers must use.

Suggested fix: Update the constructor comment to document uart, cmd, and param, and remove the stale cmd_data_tp_name entry.

Suggested change
* @param cmd 控制命令对象引用
* @param task_stack_depth_uart UART任务栈深度
* @param param Value configuration.
* @param cmd_data_tp_name CMD数据主题名称
* @param uart UART对象引用
* @param cmd 控制命令对象引用
* @param param Value configuration.

@Jiu-xiao
Jiu-xiao merged commit e9c1326 into master Oct 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant