Skip to content

Commit 1383291

Browse files
committed
bug fixed for hako asset runner, the setup callback will be called for this fix
1 parent d0ce110 commit 1383291

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/hakoc/src/hako_asset_runner.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,6 @@ bool hako_asset_runner_init(const char* asset_name, const char* config_path, hak
200200
}
201201
bool hako_asset_runner_register_callback(const hako_asset_runner_callback_t* callback)
202202
{
203-
if (hako_asset_runner_ctrl.is_initialized == false) {
204-
return false;
205-
}
206203
hako_asset_runner_ctrl.callback = callback;
207204
return true;
208205
}
@@ -289,6 +286,9 @@ static bool hako_asset_runner_wait_running(void)
289286
hako_asset_runner_ctrl.callback->setup();
290287
}
291288
}
289+
else {
290+
// nothing to do
291+
}
292292
return true;
293293
}
294294
static bool hako_asset_runner_execute(void)
@@ -311,7 +311,7 @@ static bool hako_asset_runner_execute(void)
311311
}
312312
result = hako_asset_runner_ctrl.hako_asset->is_simulation_mode();
313313
if (result == false) {
314-
std::cout << "NOT SIMULATION MODE" << std::endl;
314+
//std::cout << "NOT SIMULATION MODE" << std::endl;
315315
return false;
316316
}
317317
hako_time_t world_time = hako_asset_runner_ctrl.hako_asset->get_worldtime();
@@ -415,4 +415,4 @@ bool hako_asset_runner_pdu_write(const char* robo_name, HakoPduChannelIdType lch
415415
hako_time_t hako_asset_runner_get_world_time()
416416
{
417417
return hako_asset_runner_ctrl.hako_asset->get_worldtime();
418-
}
418+
}

0 commit comments

Comments
 (0)