Commit a58ca46a authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved a bug with a blocked mutex when waiting a replay from the GPS.

parent b353344b
......@@ -1216,7 +1216,9 @@ void CasteRx1::send_command(const std::string &cmd)
try{
this->gps_access.enter();
this->serial_port->write((unsigned char *)cmd.c_str(),cmd.size());
this->gps_access.exit();
this->event_server->wait_all(events,500);
this->gps_access.enter();
// compare the answer with the command
reply=this->reply_queue.front();// get the reply
this->reply_queue.pop();// remove it from the queue
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment