diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2015-12-30 18:09:22 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2015-12-31 08:04:50 +0000 |
commit | 3b21fb04408e08fd58d7f619c45dc087dba5d9e5 (patch) | |
tree | 728e30873fd97ac92cf608c6ceaf528bb1edc494 | |
parent | 0f4cb2f83f24c348c46f52245f1684f99b48f941 (diff) | |
download | qtserialport-3b21fb04408e08fd58d7f619c45dc087dba5d9e5.tar.gz |
Keep a fractional part of custom baud rate in a debug output
Change-Id: I1f7b5436a00dec545f6256d15147abd43f92767b
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r-- | src/serialport/qserialport_unix.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp index 7eb43a1..960349e 100644 --- a/src/serialport/qserialport_unix.cpp +++ b/src/serialport/qserialport_unix.cpp @@ -524,10 +524,10 @@ bool QSerialPortPrivate::setCustomBaudRate(qint32 baudRate, QSerialPort::Directi } if (serial.custom_divisor * baudRate != serial.baud_base) { - qWarning("Baud rate of serial port %s is set to %d instead of %d: divisor %f unsupported", + qWarning("Baud rate of serial port %s is set to %f instead of %d: divisor %f unsupported", qPrintable(systemLocation), - serial.baud_base / serial.custom_divisor, - baudRate, (float)serial.baud_base / baudRate); + float(serial.baud_base) / serial.custom_divisor, + baudRate, float(serial.baud_base) / baudRate); } if (::ioctl(descriptor, TIOCSSERIAL, &serial) == -1) { |