Changeset 6773 in ntrip for trunk/BNC/src/bncgetthread.cpp


Ignore:
Timestamp:
Apr 13, 2015, 12:43:07 PM (7 years ago)
Author:
stuerze
Message:

minor changes for sending manual nmea

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncgetthread.cpp

    r6770 r6773  
    828828  if (_serialPort) {
    829829
     830    if (_nmea == "yes" && _serialNMEA == MANUAL_NMEA) {
     831      if (_manualNMEASampl) {
     832        int dt = _lastManualNMEA.secsTo(QDateTime::currentDateTime());
     833        if (dt && (fmod(double(dt), double(_manualNMEASampl)) == 0.0)) {
     834          _query->sendNMEA(_manualNMEAString);
     835          _lastManualNMEA = QDateTime::currentDateTime();
     836        }
     837      }
     838    }
     839
    830840    int nb = _serialPort->bytesAvailable();
    831 
    832841    if (nb > 0) {
    833842      QByteArray data = _serialPort->read(nb);
     
    847856      }
    848857
    849       if (_nmea == "yes" && _serialNMEA == MANUAL_NMEA) {
    850         if (_manualNMEASampl) {
    851           int dt = _lastManualNMEA.secsTo(QDateTime::currentDateTime());
    852           if (dt && (fmod(double(dt), double(_manualNMEASampl)) == 0.0)) {
    853             _query->sendNMEA(_manualNMEAString);
    854             _lastManualNMEA = QDateTime::currentDateTime();
    855           }
    856         }
    857       }
    858 
    859858      if (_serialOutFile) {
    860859        _serialOutFile->write(data);
Note: See TracChangeset for help on using the changeset viewer.