|
@@ -311,7 +311,7 @@ namespace saturn_ros2
|
|
|
|
|
|
void SaturnController::mainTimerCallback() {
|
|
void SaturnController::mainTimerCallback() {
|
|
common_status_result_ = rcClientInterfaceGetCommonStatus(&common_status_data_);
|
|
common_status_result_ = rcClientInterfaceGetCommonStatus(&common_status_data_);
|
|
- if(is_getting_com_success_ == true && result == false){
|
|
|
|
|
|
+ if(is_getting_com_success_ == true && common_status_result_ == false){
|
|
is_getting_com_success_ = false;
|
|
is_getting_com_success_ = false;
|
|
SPDLOG_INFO("rcClientInterfaceGetCommonStatus starts to fail.");
|
|
SPDLOG_INFO("rcClientInterfaceGetCommonStatus starts to fail.");
|
|
|
|
|
|
@@ -322,12 +322,12 @@ void SaturnController::mainTimerCallback() {
|
|
config_handler_->motion_computer_ip_address_.c_str());
|
|
config_handler_->motion_computer_ip_address_.c_str());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- else if (is_getting_com_success_ == false && result == true)
|
|
|
|
|
|
+ else if (is_getting_com_success_ == false && common_status_result_ == true)
|
|
{
|
|
{
|
|
is_getting_com_success_ = true;
|
|
is_getting_com_success_ = true;
|
|
SPDLOG_INFO("rcClientInterfaceGetCommonStatus starts to succeed.");
|
|
SPDLOG_INFO("rcClientInterfaceGetCommonStatus starts to succeed.");
|
|
}
|
|
}
|
|
- else if (is_getting_com_success_ == false && result == false)
|
|
|
|
|
|
+ else if (is_getting_com_success_ == false && common_status_result_ == false)
|
|
{
|
|
{
|
|
reconnect_count_++;
|
|
reconnect_count_++;
|
|
if (reconnect_count_ % 500 == 0)
|
|
if (reconnect_count_ % 500 == 0)
|