Changeset 10766 in ntrip
- Timestamp:
- Oct 23, 2025, 12:12:57 PM (4 weeks ago)
- Location:
- trunk/BNC
- Files:
-
- 10 edited
-
CHANGELOG.md (modified) (1 diff)
-
src/bncgetthread.cpp (modified) (7 diffs)
-
src/bncgetthread.h (modified) (2 diffs)
-
src/bncnetquerys.cpp (modified) (9 diffs)
-
src/bncnetquerys.h (modified) (2 diffs)
-
src/bncserialport.cpp (modified) (3 diffs)
-
src/bncversion.h (modified) (1 diff)
-
src/bncwindow.cpp (modified) (8 diffs)
-
src/bncwindow.h (modified) (2 diffs)
-
src/src.pri (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/CHANGELOG.md
r10755 r10766 1 1 # Changelog 2 ## 2.13.5 (2025-10-23) 3 - CHANGED: The external class QextSerialPort was replaced by Qt internal class QSerialPort 4 - CHANGED: The serial port is now introduced as case sensitive in 'Add streams' and supports a wider range of interfaces with it 5 2 6 ## 2.13.4 (2025-09-02) 3 7 - ADDED: **NtripServer Functionallity:** BNC can upload streams in any format to another caster installation -
trunk/BNC/src/bncgetthread.cpp
r10753 r10766 52 52 #include <QTableWidget> 53 53 #include <QTime> 54 #include <QtSerialPort/QSerialPort> 54 55 55 56 #include "bncgetthread.h" … … 71 72 #include "RTCM/RTCM2Decoder.h" 72 73 #include "RTCM3/RTCM3Decoder.h" 73 #include "serial/qextserialport.h"74 74 75 75 using namespace std; … … 157 157 + _nmeaServer->errorString(); 158 158 emit newMessage(message.toLatin1(), true); 159 } else { 160 connect(_nmeaServer, SIGNAL(newConnection()), this, 161 SLOT(slotNewNMEAConnection())); 162 connect(BNC_CORE, SIGNAL(newNMEAstr(QByteArray, QByteArray)), this, 163 SLOT(slotNewNMEAstr(QByteArray, QByteArray))); 159 } 160 else { 161 connect(_nmeaServer, SIGNAL(newConnection()), this, SLOT(slotNewNMEAConnection())); 162 connect(BNC_CORE, SIGNAL(newNMEAstr(QByteArray, QByteArray)), this, SLOT(slotNewNMEAstr(QByteArray, QByteArray))); 164 163 _nmeaSockets = new QList<QTcpSocket*>; 165 164 _nmeaPortsMap[_staID] = nmeaPort; … … 175 174 _serialOutFile = 0; 176 175 _serialPort = 0; 176 QString portString = settings.value("serialPortName").toString(); 177 177 178 178 if (!_staID.isEmpty() 179 179 && settings.value("serialMountPoint").toString() == _staID) { 180 _serialPort = new QextSerialPort( 181 settings.value("serialPortName").toString()); 182 _serialPort->setTimeout(0, 100); 180 _serialPort = new QSerialPort(portString); 183 181 184 182 // Baud Rate 185 183 // --------- 186 184 QString hlp = settings.value("serialBaudRate").toString(); 187 if (hlp == "110") { 188 _serialPort->setBaudRate(BAUD110); 189 } else if (hlp == "300") { 190 _serialPort->setBaudRate(BAUD300); 191 } else if (hlp == "600") { 192 _serialPort->setBaudRate(BAUD600); 193 } else if (hlp == "1200") { 194 _serialPort->setBaudRate(BAUD1200); 185 if (hlp == "1200") { 186 _serialPort->setBaudRate(QSerialPort::Baud1200); 195 187 } else if (hlp == "2400") { 196 _serialPort->setBaudRate( BAUD2400);188 _serialPort->setBaudRate(QSerialPort::Baud2400); 197 189 } else if (hlp == "4800") { 198 _serialPort->setBaudRate( BAUD4800);190 _serialPort->setBaudRate(QSerialPort::Baud4800); 199 191 } else if (hlp == "9600") { 200 _serialPort->setBaudRate( BAUD9600);192 _serialPort->setBaudRate(QSerialPort::Baud9600); 201 193 } else if (hlp == "19200") { 202 _serialPort->setBaudRate( BAUD19200);194 _serialPort->setBaudRate(QSerialPort::Baud19200); 203 195 } else if (hlp == "38400") { 204 _serialPort->setBaudRate( BAUD38400);196 _serialPort->setBaudRate(QSerialPort::Baud38400); 205 197 } else if (hlp == "57600") { 206 _serialPort->setBaudRate( BAUD57600);198 _serialPort->setBaudRate(QSerialPort::Baud57600); 207 199 } else if (hlp == "115200") { 208 _serialPort->setBaudRate( BAUD115200);200 _serialPort->setBaudRate(QSerialPort::Baud115200); 209 201 } 210 202 … … 213 205 hlp = settings.value("serialParity").toString(); 214 206 if (hlp == "NONE") { 215 _serialPort->setParity( PAR_NONE);207 _serialPort->setParity(QSerialPort::NoParity); 216 208 } else if (hlp == "ODD") { 217 _serialPort->setParity( PAR_ODD);209 _serialPort->setParity(QSerialPort::OddParity); 218 210 } else if (hlp == "EVEN") { 219 _serialPort->setParity( PAR_EVEN);211 _serialPort->setParity(QSerialPort::EvenParity); 220 212 } else if (hlp == "SPACE") { 221 _serialPort->setParity(PAR_SPACE); 213 _serialPort->setParity(QSerialPort::SpaceParity); 214 } else if (hlp == "MARK") { 215 _serialPort->setParity( QSerialPort::MarkParity); 222 216 } 223 217 … … 225 219 // --------- 226 220 hlp = settings.value("serialDataBits").toString(); 227 if (hlp == "5") { 228 _serialPort->setDataBits( DATA_5);221 if (hlp == "5") { 222 _serialPort->setDataBits(QSerialPort::Data5); 229 223 } else if (hlp == "6") { 230 _serialPort->setDataBits( DATA_6);224 _serialPort->setDataBits(QSerialPort::Data6); 231 225 } else if (hlp == "7") { 232 _serialPort->setDataBits( DATA_7);226 _serialPort->setDataBits(QSerialPort::Data7); 233 227 } else if (hlp == "8") { 234 _serialPort->setDataBits(DATA_8); 235 } 228 _serialPort->setDataBits(QSerialPort::Data8); 229 } 230 // Stop Bits 231 // --------- 236 232 hlp = settings.value("serialStopBits").toString(); 237 if (hlp == "1") { 238 _serialPort->setStopBits(STOP_1); 233 if (hlp == "1") { 234 _serialPort->setStopBits(QSerialPort::OneStop); 235 } else if (hlp == "1.5") { 236 _serialPort->setStopBits(QSerialPort::OneAndHalfStop); 239 237 } else if (hlp == "2") { 240 _serialPort->setStopBits( STOP_2);238 _serialPort->setStopBits(QSerialPort::TwoStop); 241 239 } 242 240 … … 244 242 // ------------ 245 243 hlp = settings.value("serialFlowControl").toString(); 246 if (hlp == "XONXOFF") { 247 _serialPort->setFlowControl( FLOW_XONXOFF);244 if (hlp == "XONXOFF") { 245 _serialPort->setFlowControl(QSerialPort::SoftwareControl); 248 246 } else if (hlp == "HARDWARE") { 249 _serialPort->setFlowControl( FLOW_HARDWARE);247 _serialPort->setFlowControl(QSerialPort::HardwareControl); 250 248 } else { 251 _serialPort->setFlowControl( FLOW_OFF);249 _serialPort->setFlowControl(QSerialPort::NoFlowControl); 252 250 } 253 251 254 252 // Open Serial Port 255 253 // ---------------- 256 _serialPort->open(QIODevice::ReadWrite | QIODevice::Unbuffered); 254 //_serialPort->open(QIODevice::ReadWrite | QIODevice::Unbuffered); 255 _serialPort->open(QIODevice::ReadWrite); 257 256 msleep(100); //sleep 0.1 sec 258 257 if (!_serialPort->isOpen()) { 259 emit(newMessage((_staID + ": Cannot open serial port " + _serialPort->errorString()).toLatin1(), true)); 258 emit(newMessage(_staID + ": Cannot open serial port " + portString.toLatin1() 259 + ": " + _serialPort->errorString().toLatin1(), true)); 260 260 delete _serialPort; 261 261 _serialPort = 0; 262 262 } 263 264 connect(_serialPort, SIGNAL(readyRead()), this, SLOT(slotSerialReadyRead())); 263 else { 264 connect(_serialPort, SIGNAL(readyRead()), this, SLOT(slotSerialReadyRead())); 265 } 265 266 266 267 // Automatic NMEA -
trunk/BNC/src/bncgetthread.h
r10423 r10766 40 40 41 41 class GPSDecoder; 42 class Q extSerialPort;42 class QSerialPort; 43 43 class latencyChecker; 44 44 … … 124 124 int _ssrEpoch; 125 125 bncRawFile* _rawFile; 126 Q extSerialPort* _serialPort;126 QSerialPort* _serialPort; 127 127 bool _isToBeDeleted; 128 128 bool _rtcmObs; -
trunk/BNC/src/bncnetquerys.cpp
r8204 r10766 11 11 * Created: 8-Mar-2009 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ … … 34 34 } 35 35 36 // 36 // 37 37 //////////////////////////////////////////////////////////////////////////// 38 38 void bncNetQueryS::stop() { … … 42 42 #endif 43 43 _status = finished; 44 } 45 46 // 44 } 45 46 // 47 47 ///////////////////////////////////////////////////////////////////////////// 48 48 void bncNetQueryS::waitForRequestResult(const QUrl&, QByteArray&) { 49 49 } 50 50 51 // 51 // 52 52 //////////////////////////////////////////////////////////////////////////// 53 53 void bncNetQueryS::waitForReadyRead(QByteArray& outData) { … … 70 70 71 71 _url = url; 72 72 73 if (_url.scheme().isEmpty()) { 73 74 _url.setScheme("http"); … … 79 80 QString hlp; 80 81 QStringList hlpL; 81 hlp = _url.host().toLatin1().replace("-"," ");82 hlpL = hlp.split(" ");83 82 84 83 // Serial Port 85 84 // ----------- 85 hlp = _url.userInfo().replace("-"," "); 86 hlpL = hlp.split(" "); 86 87 QString _portString; 87 if (hlpL.size() == 6) {88 _portString = hlpL[hlpL.size()- 6].replace("com","COM");88 if (hlpL.size() == 1) { 89 _portString = hlpL[hlpL.size()-1]; 89 90 } else { 90 _portString = "/" + hlpL[hlpL.size()-7] + "/" + hlpL[hlpL.size()-6].replace("ttys","ttyS"); 91 } 92 _serialPort = new QextSerialPort(_portString); 91 _portString = "/" + hlpL[hlpL.size()-2] + "/" + hlpL[hlpL.size()-1]; 92 } 93 94 _serialPort = new QSerialPort(_portString); 95 93 96 94 97 // Baud Rate 95 98 // --------- 99 hlp = _url.host().replace("-"," "); 100 hlpL = hlp.split(" "); 96 101 hlp = hlpL[hlpL.size()-1]; 97 if (hlp == "110") { 98 _serialPort->setBaudRate(BAUD110); 99 } 100 else if (hlp == "300") { 101 _serialPort->setBaudRate(BAUD300); 102 } 103 else if (hlp == "600") { 104 _serialPort->setBaudRate(BAUD600); 105 } 106 else if (hlp == "1200") { 107 _serialPort->setBaudRate(BAUD1200); 102 if (hlp == "1200") { 103 _serialPort->setBaudRate(QSerialPort::Baud1200); 108 104 } 109 105 else if (hlp == "2400") { 110 _serialPort->setBaudRate( BAUD2400);106 _serialPort->setBaudRate(QSerialPort::Baud2400); 111 107 } 112 108 else if (hlp == "4800") { 113 _serialPort->setBaudRate( BAUD4800);109 _serialPort->setBaudRate(QSerialPort::Baud4800); 114 110 } 115 111 else if (hlp == "9600") { 116 _serialPort->setBaudRate( BAUD9600);112 _serialPort->setBaudRate(QSerialPort::Baud9600); 117 113 } 118 114 else if (hlp == "19200") { 119 _serialPort->setBaudRate( BAUD19200);115 _serialPort->setBaudRate(QSerialPort::Baud19200); 120 116 } 121 117 else if (hlp == "38400") { 122 _serialPort->setBaudRate( BAUD38400);118 _serialPort->setBaudRate(QSerialPort::Baud38400); 123 119 } 124 120 else if (hlp == "57600") { 125 _serialPort->setBaudRate( BAUD57600);121 _serialPort->setBaudRate(QSerialPort::Baud57600); 126 122 } 127 123 else if (hlp == "115200") { 128 _serialPort->setBaudRate( BAUD115200);124 _serialPort->setBaudRate(QSerialPort::Baud115200); 129 125 } 130 126 … … 133 129 hlp = hlpL[hlpL.size()-4].toUpper(); 134 130 if (hlp == "NONE") { 135 _serialPort->setParity( PAR_NONE);131 _serialPort->setParity(QSerialPort::NoParity); 136 132 } 137 133 else if (hlp == "ODD") { 138 _serialPort->setParity( PAR_ODD);134 _serialPort->setParity(QSerialPort::OddParity); 139 135 } 140 136 else if (hlp == "EVEN") { 141 _serialPort->setParity( PAR_EVEN);137 _serialPort->setParity(QSerialPort::EvenParity); 142 138 } 143 139 else if (hlp == "SPACE") { 144 _serialPort->setParity(PAR_SPACE); 145 } 140 _serialPort->setParity(QSerialPort::SpaceParity); 141 } 142 else if (hlp == "MARK") { 143 _serialPort->setParity(QSerialPort::MarkParity); 144 } 145 146 146 147 147 // Data Bits … … 149 149 hlp = hlpL[hlpL.size()-5]; 150 150 if (hlp == "5") { 151 _serialPort->setDataBits( DATA_5);151 _serialPort->setDataBits(QSerialPort::Data5); 152 152 } 153 153 else if (hlp == "6") { 154 _serialPort->setDataBits( DATA_6);154 _serialPort->setDataBits(QSerialPort::Data6); 155 155 } 156 156 else if (hlp == "7") { 157 _serialPort->setDataBits( DATA_7);157 _serialPort->setDataBits(QSerialPort::Data6); 158 158 } 159 159 else if (hlp == "8") { 160 _serialPort->setDataBits( DATA_8);160 _serialPort->setDataBits(QSerialPort::Data7); 161 161 } 162 162 … … 165 165 hlp = hlpL[hlpL.size()-3]; 166 166 if (hlp == "1") { 167 _serialPort->setStopBits(STOP_1); 167 _serialPort->setStopBits(QSerialPort::OneStop); 168 } 169 else if (hlp == "1.5") { 170 _serialPort->setStopBits(QSerialPort::OneAndHalfStop); 168 171 } 169 172 else if (hlp == "2") { 170 _serialPort->setStopBits( STOP_2);173 _serialPort->setStopBits(QSerialPort::TwoStop); 171 174 } 172 175 … … 175 178 hlp = hlpL[hlpL.size()-2].toUpper(); 176 179 if (hlp == "XONXOFF") { 177 _serialPort->setFlowControl( FLOW_XONXOFF);180 _serialPort->setFlowControl(QSerialPort::SoftwareControl); 178 181 } 179 182 else if (hlp == "HARDWARE") { 180 _serialPort->setFlowControl( FLOW_HARDWARE);183 _serialPort->setFlowControl(QSerialPort::HardwareControl); 181 184 } 182 185 else { 183 _serialPort->setFlowControl( FLOW_OFF);186 _serialPort->setFlowControl(QSerialPort::NoFlowControl); 184 187 } 185 188 186 189 _status = running; 187 190 188 _serialPort->open(QIODevice::ReadWrite|QIODevice::Unbuffered); 191 //_serialPort->open(QIODevice::ReadWrite|QIODevice::Unbuffered); 192 _serialPort->open(QIODevice::ReadWrite); 193 189 194 if (!_serialPort->isOpen()) { 195 emit newMessage(_url.path().toLatin1().replace(0,1,"") + ": Cannot open serial port " + _portString.toLatin1() 196 + ": " +_serialPort->errorString().toLatin1(), true); 190 197 delete _serialPort; 191 198 _serialPort = 0; 192 199 _status = error; 193 emit newMessage(_url.path().toLatin1().replace(0,1,"") + ": Cannot open serial port " + _portString.toLatin1(), true);194 200 return; 195 201 } -
trunk/BNC/src/bncnetquerys.h
r6787 r10766 3 3 4 4 #include "bncnetquery.h" 5 #include "serial/qextserialport.h"5 #include <QtSerialPort/QSerialPort> 6 6 7 7 class bncNetQueryS : public bncNetQuery { … … 17 17 18 18 private: 19 Q extSerialPort* _serialPort;19 QSerialPort* _serialPort; 20 20 }; 21 21 -
trunk/BNC/src/bncserialport.cpp
r10524 r10766 74 74 _serialCountryLineEdit = new QLineEdit(); 75 75 76 _serialBaudRateComboBox->addItems(QString("110,300,600," 77 "1200,2400,4800,9600,19200,38400,57600,115200").split(",")); 76 _serialBaudRateComboBox->addItems(QString("1200,2400,4800,9600,19200,38400,57600,115200").split(",")); 78 77 _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(",")); 79 78 _serialDataBitsComboBox->addItems(QString("5,6,7,8").split(",")); 80 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(",")); 81 _serialStopBitsComboBox->addItems(QString("1,2").split(",")); 79 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE,MARK").split(",")); 80 _serialStopBitsComboBox->addItems(QString("1,1.5,2").split(",")); 82 81 83 82 _serialBaudRateComboBox->setCurrentIndex(7); … … 104 103 _serialLonLineEdit->setWhatsThis(tr("<p>Enter the approximate latitude of the stream providing receiver in degrees.<p></p>Example: 45.32</p>")); 105 104 _serialCountryLineEdit->setWhatsThis(tr("<p>Specify the country code.</p><p>Follow the ISO 3166-1 alpha-3a code.<br>Example, Germany: DEU</p>")); 106 _serialPortLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected device. Valid port names are</p><pre>Windows: COM1, COM2<br>Linux: /dev/ttyS0, /dev/ttyS1<br>FreeBSD: /dev/ttyd0, /dev/ttyd1<br>Digital Unix: /dev/tty01, /dev/tty02<br>HP-UX: /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX: /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>You must plug a serial cable in the port defined here before you start BNC.</p>")); 105 _serialPortLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected device. Valid port names are e.g. </p><pre>Windows: COM1, COM2<br>Linux: /dev/ttyS0, /dev/ttyS1<br>FreeBSD: /dev/ttyd0, /dev/ttyd1<br>Digital Unix: /dev/tty01, /dev/tty02<br>HP-UX: /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX: /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>You must plug a serial cable in the port defined here before you start BNC.</p>")); 107 106 _serialBaudRateComboBox->setWhatsThis(tr("<p>Select a 'Baud rate' for the serial input link.</p><p>Your selection must equal the baud rate configured to the serial connected device. Note that using a high baud rate is recommended.</p>")); 108 107 _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial input link.</p><p>Your selection must equal the number of data bits configured to the serial connected device. Note that often 8 data bits are used.</p>")); … … 184 183 !_serialLonLineEdit->text().isEmpty() ) { 185 184 mountPoints->push_back("//" 186 + _serialPortLineEdit->text().replace("/","-").replace(QRegExp("^[-]"), "") + " -"185 + _serialPortLineEdit->text().replace("/","-").replace(QRegExp("^[-]"), "") + "@" 187 186 + _serialDataBits + "-" 188 187 + _serialParity + "-" -
trunk/BNC/src/bncversion.h
r10755 r10766 3 3 #define BNCVERSION_H 4 4 5 #define BNCVERSION "2.13. 4"5 #define BNCVERSION "2.13.5" 6 6 #define BNCPGMNAME "BNC " BNCVERSION 7 7 -
trunk/BNC/src/bncwindow.cpp
r10753 r10766 341 341 _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString()); 342 342 _serialBaudRateComboBox = new QComboBox(); 343 _serialBaudRateComboBox->addItems(QString("110,300,600," 344 "1200,2400,4800,9600,19200,38400,57600,115200").split(",")); 343 _serialBaudRateComboBox->addItems(QString("1200,2400,4800,9600,19200,38400,57600,115200").split(",")); 345 344 int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString()); 346 345 if (kk != -1) { … … 360 359 } 361 360 _serialParityComboBox = new QComboBox(); 362 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(",")); 361 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE,MARK").split(",")); 363 362 kk = _serialParityComboBox->findText(settings.value("serialParity").toString()); 364 363 if (kk != -1) { … … 366 365 } 367 366 _serialStopBitsComboBox = new QComboBox(); 368 _serialStopBitsComboBox->addItems(QString("1,2").split(",")); 367 _serialStopBitsComboBox->addItems(QString("1,1.5,2").split(",")); 369 368 kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString()); 370 369 if (kk != -1) { … … 1530 1529 // ------------------------ 1531 1530 _serialMountPointLineEdit->setWhatsThis(tr("<p>Enter a 'Mountpoint' to forward the corresponding stream to a serial connected receiver.</p><p>Depending on the stream content, the receiver may use it for example for Differential GNSS, Precise Point Positioning or any other purpose supported by its firmware. <i>[key: serialMountPoint]</i></p>")); 1532 _serialPortNameLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected receiver. Valid port names are</p><pre>Windows: COM1, COM2<br>Linux: /dev/ttyS0, /dev/ttyS1<br>FreeBSD: /dev/ttyd0, /dev/ttyd1<br>Digital Unix: /dev/tty01, /dev/tty02<br>HP-UX: /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX: /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>Note that before you start BNC, you must plug a serial cable in the port defined here. <i>[key: serialPortName]</i></p>")); 1531 _serialPortNameLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected receiver. Valid port names are e.g.</p><pre>Windows: COM1, COM2<br>Linux: /dev/ttyS0, /dev/ttyS1<br>FreeBSD: /dev/ttyd0, /dev/ttyd1<br>Digital Unix: /dev/tty01, /dev/tty02<br>HP-UX: /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX: /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>Note that before you start BNC, you must plug a serial cable in the port defined here. <i>[key: serialPortName]</i></p>")); 1533 1532 _serialBaudRateComboBox->setWhatsThis(tr("<p>Select a 'Baud rate' for the serial output link.</p><p>Note that your selection must equal the baud rate configured to the serial connected receiver. Using a high baud rate is recommended. <i>[key: serialBaudRate]</i></p>")); 1534 1533 _serialFlowControlComboBox->setWhatsThis(tr("<p>Select a 'Flow control' for the serial output link.</p><p>Note that your selection must equal the flow control configured to the serial connected receiver. Select 'OFF' if you don't know better. <i>[key: serialFlowControl]</i></p>")); … … 1888 1887 QUrl url(hlp[0]); 1889 1888 1890 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path(); 1891 QString format(hlp[1]); QString country(hlp[2]); QString latitude(hlp[3]); QString longitude(hlp[4]); 1889 QString format(hlp[1]); 1890 QString country(hlp[2]); 1891 QString latitude(hlp[3]); 1892 QString longitude(hlp[4]); 1892 1893 QString nmea(hlp[5]); 1893 if (hlp[6] == "S") { 1894 fullPath = hlp[0].replace(0, 2, ""); 1895 } 1896 QString ntripVersion = "2"; 1897 if (hlp.size() >= 7) { 1898 ntripVersion = (hlp[6]); 1894 QString ntripVersion(hlp[6]); 1895 1896 QString fullPath; 1897 if (ntripVersion == 'S') { 1898 // url.userInfo() contains the case sensitive portName 1899 // the portName shall be part of the mountpointString 1900 // to inform the user about the source of the stream 1901 if (url.host().contains(url.userInfo().toLower())) { 1902 fullPath = url.host() + url.path(); 1903 } 1904 else { 1905 fullPath = url.userInfo() + "-" + url.host() + url.path(); 1906 } 1907 } else { 1908 fullPath = url.host() + QString(":%1").arg(url.port()) + url.path(); 1909 ntripVersion = "2"; 1899 1910 } 1900 1911 … … 2053 2064 while (it.hasNext()) { 2054 2065 QStringList hlp = it.next().split(" "); 2055 QUrl url(hlp[0]); 2056 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path(); 2057 QString format(hlp[1]); QString country(hlp[2]); QString latitude(hlp[3]); QString longitude(hlp[4]); 2066 2067 QUrl url(hlp[0]); 2068 2069 QString format(hlp[1]); 2070 QString country(hlp[2]); 2071 QString latitude(hlp[3]); 2072 QString longitude(hlp[4]); 2058 2073 QString nmea(hlp[5]); 2059 if (hlp[6] == "S") { 2060 fullPath = hlp[0].replace(0, 2, ""); 2061 } 2062 QString ntripVersion = "2"; 2063 if (hlp.size() >= 7) { 2064 ntripVersion = (hlp[6]); 2074 QString ntripVersion(hlp[6]); 2075 2076 QString fullPath; 2077 if (ntripVersion == 'S') { 2078 // url.userInfo() contains the case sensitive portName 2079 // the portName shall be part of the mountpointString 2080 // to inform the user about the source of the stream 2081 if (url.host().contains(url.userInfo().toLower())) { 2082 fullPath = url.host() + url.path(); 2083 } 2084 else { 2085 fullPath = url.userInfo() + "-" + url.host() + url.path(); 2086 } 2087 } else { 2088 fullPath = url.host() + QString(":%1").arg(url.port()) + url.path(); 2089 ntripVersion = "2"; 2065 2090 } 2066 2091 … … 2102 2127 2103 2128 it = new QTableWidgetItem(ntripVersion); 2104 ////it->setFlags(it->flags() & ~Qt::ItemIsEditable); 2129 //// it->setFlags(it->flags() & ~Qt::ItemIsEditable); 2105 2130 _mountPointsTable->setItem(iRow, 7, it); 2106 2131 … … 2133 2158 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) { 2134 2159 2135 if (_mountPointsTable->item(iRow, 6)->text() != "S") { 2136 QUrl url("//" + _mountPointsTable->item(iRow, 0)->text() + 2137 "@" + _mountPointsTable->item(iRow, 1)->text()); 2138 2139 mountPoints.append(url.toString() + " " + 2140 _mountPointsTable->item(iRow, 2)->text() 2141 + " " + _mountPointsTable->item(iRow, 3)->text() 2142 + " " + _mountPointsTable->item(iRow, 4)->text() 2143 + " " + _mountPointsTable->item(iRow, 5)->text() 2144 + " " + _mountPointsTable->item(iRow, 6)->text() 2145 + " " + _mountPointsTable->item(iRow, 7)->text()); 2146 } 2147 else { 2148 mountPoints.append( 2149 "//" + _mountPointsTable->item(iRow, 1)->text() 2150 + " " + _mountPointsTable->item(iRow, 2)->text() 2151 + " " + _mountPointsTable->item(iRow, 3)->text() 2152 + " " + _mountPointsTable->item(iRow, 4)->text() 2153 + " " + _mountPointsTable->item(iRow, 5)->text() 2154 + " " + _mountPointsTable->item(iRow, 6)->text() 2155 + " " + _mountPointsTable->item(iRow, 7)->text()); 2156 } 2160 QUrl url("//" 2161 + _mountPointsTable->item(iRow, 0)->text() + "@" 2162 + _mountPointsTable->item(iRow, 1)->text()); 2163 2164 mountPoints.append(url.toString() 2165 + " " + _mountPointsTable->item(iRow, 2)->text() 2166 + " " + _mountPointsTable->item(iRow, 3)->text() 2167 + " " + _mountPointsTable->item(iRow, 4)->text() 2168 + " " + _mountPointsTable->item(iRow, 5)->text() 2169 + " " + _mountPointsTable->item(iRow, 6)->text() 2170 + " " + _mountPointsTable->item(iRow, 7)->text()); 2157 2171 } 2158 2172 -
trunk/BNC/src/bncwindow.h
r10753 r10766 67 67 void CreateMenu(); 68 68 void AddToolbar(); 69 69 70 70 71 public slots: … … 107 108 108 109 private: 110 109 111 void saveOptions(); 110 112 void populateMountPointsTable(); -
trunk/BNC/src/src.pri
r10753 r10766 9 9 QT += widgets 10 10 QT += core 11 QT += serialport 11 12 12 13 unix:QMAKE_CFLAGS_RELEASE -= -O2 … … 18 19 release:MOC_DIR=.moc/release 19 20 20 release:DEFINES += SPLITBLOCK 21 debug:DEFINES += SPLITBLOCK 21 release:DEFINES += SPLITBLOCK 22 debug:DEFINES += SPLITBLOCK 22 23 #debug:DEFINES += BNC_DEBUG_OBS 23 24 #debug:DEFINES += BNC_DEBUG_BCE … … 25 26 #debug:DEFINES += BNC_DEBUG_SSR 26 27 #debug:DEFINES += BNC_DEBUG_CMB 27 #debug:DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F0028 #debug:DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 28 29 29 30 !versionAtLeast(QT_VERSION, 5.15.0):error("Use at least Qt version 5.15.0") … … 78 79 combination/bnccomb.h combination/bncbiassnx.h 79 80 80 HEADERS += serial/qextserialbase.h serial/qextserialport.h81 unix:HEADERS += serial/posix_qextserialport.h82 win32:HEADERS += serial/win_qextserialport.h83 81 84 82 SOURCES = bncgetthread.cpp bncwindow.cpp bnctabledlg.cpp \ … … 121 119 combination/bnccomb.cpp combination/bncbiassnx.cpp 122 120 123 SOURCES += serial/qextserialbase.cpp serial/qextserialport.cpp124 unix:SOURCES += serial/posix_qextserialport.cpp125 win32:SOURCES += serial/win_qextserialport.cpp126 127 121 RC_FILE = bnc.rc 128 122
Note:
See TracChangeset
for help on using the changeset viewer.
