From a58ca46ad1dd9f31d180b4505a5bb2430d7884c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergi=20Hern=C3=A0ndez=20Juan?= <shernand@iri.upc.edu> Date: Fri, 18 Mar 2016 10:48:31 +0000 Subject: [PATCH] Solved a bug with a blocked mutex when waiting a replay from the GPS. --- src/asterx1_gps.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/asterx1_gps.cpp b/src/asterx1_gps.cpp index d8cefd7..c3cbeec 100644 --- a/src/asterx1_gps.cpp +++ b/src/asterx1_gps.cpp @@ -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 -- GitLab