diff --git a/src/asterx1_gps.cpp b/src/asterx1_gps.cpp index d8cefd7bd4db5f264956673cfbc5280bfdf35692..c3cbeec09ea0e4da98f26f2e1185b7156533c468 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