File tree 2 files changed +5
-4
lines changed 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -728,10 +728,10 @@ void ModbusWnd::onLineModbusEditingFinished()
728
728
{
729
729
QString str = ui->lineModbusTimeout ->text ();
730
730
731
- if ( ui->lineModbusTimeout ->text ().toInt () < 10 )
731
+ if ( ui->lineModbusTimeout ->text ().toInt () < 1 )
732
732
{
733
- QMessageBox::warning (this , " Error" , " modbus timeout should not be lower than 10 msec" );
734
- ui->lineModbusTimeout ->setText (" 10 " );
733
+ QMessageBox::warning (this , " Error" , " modbus timeout should not be lower than 1 msec" );
734
+ ui->lineModbusTimeout ->setText (" 1 " );
735
735
return ;
736
736
}
737
737
m_port->setResponseTimeout (str.toInt () );
Original file line number Diff line number Diff line change @@ -303,7 +303,8 @@ void SerialPort::onReadyRead()
303
303
QByteArray buffer;
304
304
while (m_port->bytesAvailable ())
305
305
{
306
- m_timerResponseTimeout->start (m_msec_responseTimeout, Qt::PreciseTimer, this );
306
+ if ( m_timerResponseTimeout->isActive () == true )
307
+ m_timerResponseTimeout->start (m_msec_responseTimeout, Qt::PreciseTimer, this );
307
308
buffer = m_port->read (1 );
308
309
309
310
if ( m_commMode == " LSBUS" )
You can’t perform that action at this time.
0 commit comments