Revision | 0f5d3c870538b4aa13f77745bceb1510a980e52d (tree) |
---|---|
Time | 2018-10-10 21:39:52 |
Author | Sergey Gusarov |
Commiter | Sergey Gusarov |
Changed debug messages
@@ -210,7 +210,11 @@ | ||
210 | 210 | } |
211 | 211 | }; |
212 | 212 | |
213 | - if (!serialPort.open(qtOpenMode)) | |
213 | + if (serialPort.open(qtOpenMode)) | |
214 | + { | |
215 | + //CT_TRACE_DEBUG("Opened Com Port=%s, thread=%u", comPort.c_str(), QThread::currentThreadId()); | |
216 | + } | |
217 | + else | |
214 | 218 | { |
215 | 219 | const QSerialPort::SerialPortError kError = serialPort.error(); |
216 | 220 | const int kErrorValue = static_cast<int>(kError); |
@@ -219,16 +223,14 @@ | ||
219 | 223 | CPT_THROW(cpptools::exceptions::ComPortOpenException, |
220 | 224 | std::error_code(kErrorValue, std::system_category()), comPort); |
221 | 225 | } |
222 | - else | |
223 | - { | |
224 | - CT_TRACE_DEBUG("Opened Com Port=%s", comPort.c_str()); | |
225 | - } | |
226 | 226 | } |
227 | 227 | |
228 | 228 | void SerialCommandsController::closeComPort() |
229 | 229 | { |
230 | 230 | serialPort.close(); |
231 | 231 | |
232 | + //CT_TRACE_DEBUG("Closed port %s, thread=%u", QTT_LATIN_PRINTABLE(serialPort.portName()), QThread::currentThreadId()); | |
233 | + | |
232 | 234 | const QSerialPort::SerialPortError kError = serialPort.error(); |
233 | 235 | |
234 | 236 | CT_TRACE_WARNING_IF(kError != QSerialPort::NoError, "Error detected(%u) while closing the port %s", |