- Timestamp:
- May 25, 2008, 5:37:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bnseph.cpp
r926 r929 67 67 } 68 68 if (_socket && _socket->state() == QAbstractSocket::ConnectedState) { 69 if (_socket->canReadLine()) { 70 readEph(); 71 } 72 else { 73 _socket->waitForReadyRead(10); 74 } 69 readEph(); 75 70 } 76 71 else { … … 84 79 void t_bnseph::readEph() { 85 80 86 87 81 t_eph* eph = 0; 88 89 QByteArray line = _socket->readLine(); 82 QByteArray line = waitForLine(_socket); 83 90 84 QTextStream in(line); 91 85 QString prn; … … 107 101 108 102 for (int ii = 2; ii <= numlines; ii++) { 109 QByteArray line = _socket->readLine();103 QByteArray line = waitForLine(_socket); 110 104 lines << line; 111 105 } … … 131 125 //////////////////////////////////////////////////////////////////////////// 132 126 void t_ephGPS::read(const QStringList& lines) { 127 128 for (int ii = 1; ii <= lines.size(); ii++) { 129 cout << lines.at(ii-1).toAscii().data(); 130 } 133 131 134 132 for (int ii = 1; ii <= lines.size(); ii++) { … … 267 265 268 266 for (int ii = 1; ii <= lines.size(); ii++) { 267 cout << lines.at(ii-1).toAscii().data(); 268 } 269 270 for (int ii = 1; ii <= lines.size(); ii++) { 269 271 QTextStream in(lines.at(ii-1).toAscii()); 270 272
Note:
See TracChangeset
for help on using the changeset viewer.