Skip to content

Commit 638e17f

Browse files
author
hanjun
committed
fix
1 parent 0f7211c commit 638e17f

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

my_pb_channel/src/module/normal_subscriber_module/normal_subscriber_module.cc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,9 @@ bool NormalSubscriberModule::Initialize(aimrt::CoreRef core) {
1818
topic_name_ = cfg_node["topic_name"].as<std::string>();
1919
}
2020

21-
<<<<<<< HEAD
22-
// Register subscriber(it contains two steps)
23-
// Step1: get subscriber handle with topic name
24-
subscriber_ = core_.GetChannelHandle().GetSubscriber(topic_name_);
25-
AIMRT_CHECK_ERROR_THROW(subscriber_, "Get subscriber for topic '{}' failed.", topic_name_);
26-
27-
// Step2: register callback function for subscriber (aimrt_samples::protocols::EventMsg is the message type)
28-
bool ret = aimrt::channel::Subscribe<aimrt_samples::protocols::EventMsg>(
29-
subscriber_,
30-
std::bind(&NormalSubscriberModule::EventHandle, this, std::placeholders::_1, std::placeholders::_2));
31-
AIMRT_CHECK_ERROR_THROW(ret, "Subscribe failed.");
32-
=======
3321
// Register subscriber
3422
subscriber_ = ctx_ptr_->CreateSubscriber<aimrt_samples::protocols::EventMsg>(topic_name_,
3523
std::bind(&NormalSubscriberModule::EventHandle, this, std::placeholders::_1, std::placeholders::_2));
36-
>>>>>>> 2b646fd (fix)
3724

3825
} catch (const std::exception& e) {
3926
AIMRT_ERROR("Init failed, {}", e.what());

0 commit comments

Comments
 (0)