Skip to content
Snippets Groups Projects
Commit 8b6dfe9f authored by BAHJI's avatar BAHJI
Browse files

Fix cmd #5 for hardware

parent 7773dc6d
Branches
Tags
1 merge request!3[PIController] Add PIAxis commands and attributes
......@@ -248,7 +248,13 @@ void BoxController::process_message(yat::Message& msg)
case EXEC_READ_MODEL_MSG:
{
yat::String request = msg.get_data<std::string>();
m_model = PIBox_ns::SocketManager::get_instance()->write_read(request);
yat::String model_temp = PIBox_ns::SocketManager::get_instance()->write_read(request);
size_t pos_new_line = model_temp.find_first_of('\n');
if ( pos_new_line != std::string::npos)
{
model_temp.resize(model_temp.size () - (model_temp.size () - pos_new_line));
}
m_model = model_temp;
}
break;
......@@ -273,6 +279,7 @@ void BoxController::process_message(yat::Message& msg)
else
{
cmd = 5;
cmd = cmd + '\n';
DEBUG_STREAM << "BoxController::process_message::EXEC_LOW_LEVEL_CMD_MSG - NEW CMD: " << cmd << std::endl;
}
m_exec_low_level_cmd_out_value = PIBox_ns::SocketManager::get_instance()->write_read(cmd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment