Skip to content

Commit 00d9b13

Browse files
committed
Update.
1 parent df1c633 commit 00d9b13

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

docs/code_gen/xrobot_inter.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 2
66

77
# 与XRobot集成
88

9-
在代码生成时加入`--xrobot`选项,可以生成对应的硬件容器(LibXR::HardwareContainer)以供XRobot初始化。
9+
在代码生成时加入`--xrobot`选项,可以生成对应的硬件容器([LibXR::HardwareContainer](https://jiu-xiao.github.io/libxr/class_lib_x_r_1_1_hardware_container.html))以供XRobot初始化。
1010

1111
## 示例
1212

@@ -22,11 +22,8 @@ xr_gen_code_stm32 -i .\.config.yaml -o .\User\app_main.cpp --xrobot
2222
会在app_main.cpp中额外生成以下代码:
2323

2424
```cpp
25-
LibXR::HardwareContainer<
26-
LibXR::Entry<LibXR::PowerManager>,
27-
...
28-
> peripherals{
29-
LibXR::Entry<LibXR::PowerManager>(power_manager)
25+
LibXR::HardwareContainer peripherals{
26+
LibXR::Entry<LibXR::PowerManager>({power_manager, {"power_manager"}}),
3027
...
3128
};
3229

docs/proj_man/gen_main.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ modules:
4040
// Module headers
4141
#include "BlinkLED.hpp"
4242

43-
template <typename HardwareContainer>
44-
static void XRobotMain(HardwareContainer &hw) {
43+
static void XRobotMain(LibXR::HardwareContainer &hw) {
4544
using namespace LibXR;
4645
ApplicationManager appmgr;
4746

4847
// Auto-generated module instantiations
49-
static BlinkLED<HardwareContainer> blinkled(hw, appmgr, 250);
48+
static BlinkLED blinkled(hw, appmgr, 250);
5049

5150
while (true) {
5251
appmgr.MonitorAll();

i18n/en/docusaurus-plugin-content-docs/current/code_gen/xrobot_inter.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_position: 2
77

88
# Integrate with XRobot
99

10-
By including the `--xrobot` flag during code generation, the tool will produce a hardware container (`LibXR::HardwareContainer`) specifically designed for XRobot initialization and runtime integration.
10+
By including the `--xrobot` flag during code generation, the tool will produce a hardware container [LibXR::HardwareContainer](https://jiu-xiao.github.io/libxr/class_lib_x_r_1_1_hardware_container.html) specifically designed for XRobot initialization and runtime integration.
1111

1212
## Example
1313

@@ -23,11 +23,8 @@ xr_gen_code_stm32 -i .\.config.yaml -o .\User\app_main.cpp --xrobot
2323
This will append the following XRobot-compatible structure in `app_main.cpp`:
2424

2525
```cpp
26-
LibXR::HardwareContainer<
27-
LibXR::Entry<LibXR::PowerManager>,
28-
...
29-
> peripherals{
30-
LibXR::Entry<LibXR::PowerManager>(power_manager)
26+
LibXR::HardwareContainer peripherals{
27+
LibXR::Entry<LibXR::PowerManager>({power_manager, {"power_manager"}}),
3128
...
3229
};
3330

i18n/en/docusaurus-plugin-content-docs/current/proj_man/gen_main.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ The generated `xrobot_main.hpp` looks like:
4242
// Module headers
4343
#include "BlinkLED.hpp"
4444
45-
template <typename HardwareContainer>
46-
static void XRobotMain(HardwareContainer &hw) {
45+
static void XRobotMain(LibXR::HardwareContainer &hw) {
4746
using namespace LibXR;
4847
ApplicationManager appmgr;
4948
5049
// Auto-generated module instantiations
51-
static BlinkLED<HardwareContainer> blinkled(hw, appmgr, 250);
50+
static BlinkLED blinkled(hw, appmgr, 250);
5251
5352
while (true) {
5453
appmgr.MonitorAll();

0 commit comments

Comments
 (0)