Skip to content

Commit 7795973

Browse files
committed
proxy bug fixed
1 parent 05f5d15 commit 7795973

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/proxy/sample_config.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"asset_name": "Athrill",
3+
"robo_name": "Robot1",
34
"target_exec_dir": "src/proxy",
45
"target_bin_path": "./sample-proc.bash",
56
"target_options": [

src/proxy/src/hako_proxy.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ using namespace hako::client::proxy;
1818

1919
typedef struct {
2020
std::string asset_name_str;
21+
std::string robo_name_str;
2122
json param;
2223
ProcessManager process;
2324
std::shared_ptr<hako::IHakoSimulationEventController> hako_sim_ctrl;
@@ -104,6 +105,7 @@ static void stop_callback()
104105
static int hako_init()
105106
{
106107
ctrl.asset_name_str = ctrl.param["asset_name"];
108+
ctrl.robo_name_str = ctrl.param["robo_name"];
107109
//hako::logger::init("core");
108110
//hako::logger::init(ctrl.asset_name_str);
109111
//hako::logger::get(ctrl.asset_name_str)->info("asset_name={0}", ctrl.asset_name_str);
@@ -125,7 +127,7 @@ static int hako_init()
125127
for (unsigned int i = 0; i < ctrl.param["target_channels"].size(); i++) {
126128
std::cout << "target_channels: " << i << " target_channels: " << ctrl.param["target_channels"][i].at("size") << std::endl;
127129
bool err = ctrl.hako_asset->create_pdu_lchannel(
128-
ctrl.asset_name_str,
130+
ctrl.robo_name_str,
129131
ctrl.param["target_channels"][i].at("channel_id"),
130132
ctrl.param["target_channels"][i].at("size")
131133
);

0 commit comments

Comments
 (0)