Changeset 1633 in ntrip for trunk/BNC/bncgetthread.cpp


Ignore:
Timestamp:
Feb 20, 2009, 11:51:16 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r1632 r1633  
    261261    }
    262262
    263     _serialPort->setTimeout(3600,0);
     263    _serialPort->setTimeout(0,100);
    264264    _serialPort->setFlowControl(FLOW_OFF);
    265265  }
     
    395395      }
    396396      if (_serialPort) {
     397        slotSerialReadyRead();
    397398        _serialPort->write(data);
    398399      }
     
    593594void bncGetThread::slotSerialReadyRead() {
    594595  if (_serialPort) {
    595     QByteArray data = _serialPort->readAll();
    596     if (_serialOutFile) {
    597       _serialOutFile->write(data);
    598       _serialOutFile->flush();
    599     }
    600   }
    601 }
     596    int nb = _serialPort->bytesAvailable();
     597    if (nb > 0) {
     598      QByteArray data = _serialPort->read(nb);
     599      if (_serialOutFile) {
     600        _serialOutFile->write(data);
     601        _serialOutFile->flush();
     602      }
     603    }
     604  }
     605}
Note: See TracChangeset for help on using the changeset viewer.