Changeset 10766 in ntrip


Ignore:
Timestamp:
Oct 23, 2025, 12:12:57 PM (4 weeks ago)
Author:
stuerze
Message:

external class QextSerialPort was replaced by Qt5 internal class QSerialPort, serial port is now introduced as case sensitive

Location:
trunk/BNC
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/CHANGELOG.md

    r10755 r10766  
    11# 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
    26## 2.13.4 (2025-09-02)
    37- ADDED: **NtripServer Functionallity:** BNC can upload streams in any format to another caster installation
  • trunk/BNC/src/bncgetthread.cpp

    r10753 r10766  
    5252#include <QTableWidget>
    5353#include <QTime>
     54#include <QtSerialPort/QSerialPort>
    5455
    5556#include "bncgetthread.h"
     
    7172#include "RTCM/RTCM2Decoder.h"
    7273#include "RTCM3/RTCM3Decoder.h"
    73 #include "serial/qextserialport.h"
    7474
    7575using namespace std;
     
    157157                      + _nmeaServer->errorString();
    158158      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)));
    164163      _nmeaSockets = new QList<QTcpSocket*>;
    165164      _nmeaPortsMap[_staID] = nmeaPort;
     
    175174  _serialOutFile = 0;
    176175  _serialPort = 0;
     176  QString portString = settings.value("serialPortName").toString();
    177177
    178178  if (!_staID.isEmpty()
    179179      && settings.value("serialMountPoint").toString() == _staID) {
    180     _serialPort = new QextSerialPort(
    181         settings.value("serialPortName").toString());
    182     _serialPort->setTimeout(0, 100);
     180    _serialPort = new QSerialPort(portString);
    183181
    184182    // Baud Rate
    185183    // ---------
    186184    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);
    195187    } else if (hlp == "2400") {
    196       _serialPort->setBaudRate(BAUD2400);
     188      _serialPort->setBaudRate(QSerialPort::Baud2400);
    197189    } else if (hlp == "4800") {
    198       _serialPort->setBaudRate(BAUD4800);
     190      _serialPort->setBaudRate(QSerialPort::Baud4800);
    199191    } else if (hlp == "9600") {
    200       _serialPort->setBaudRate(BAUD9600);
     192      _serialPort->setBaudRate(QSerialPort::Baud9600);
    201193    } else if (hlp == "19200") {
    202       _serialPort->setBaudRate(BAUD19200);
     194      _serialPort->setBaudRate(QSerialPort::Baud19200);
    203195    } else if (hlp == "38400") {
    204       _serialPort->setBaudRate(BAUD38400);
     196      _serialPort->setBaudRate(QSerialPort::Baud38400);
    205197    } else if (hlp == "57600") {
    206       _serialPort->setBaudRate(BAUD57600);
     198      _serialPort->setBaudRate(QSerialPort::Baud57600);
    207199    } else if (hlp == "115200") {
    208       _serialPort->setBaudRate(BAUD115200);
     200      _serialPort->setBaudRate(QSerialPort::Baud115200);
    209201    }
    210202
     
    213205    hlp = settings.value("serialParity").toString();
    214206    if (hlp == "NONE") {
    215       _serialPort->setParity(PAR_NONE);
     207      _serialPort->setParity(QSerialPort::NoParity);
    216208    } else if (hlp == "ODD") {
    217       _serialPort->setParity(PAR_ODD);
     209      _serialPort->setParity(QSerialPort::OddParity);
    218210    } else if (hlp == "EVEN") {
    219       _serialPort->setParity(PAR_EVEN);
     211      _serialPort->setParity(QSerialPort::EvenParity);
    220212    } else if (hlp == "SPACE") {
    221       _serialPort->setParity(PAR_SPACE);
     213      _serialPort->setParity(QSerialPort::SpaceParity);
     214    } else if (hlp == "MARK") {
     215      _serialPort->setParity( QSerialPort::MarkParity);
    222216    }
    223217
     
    225219    // ---------
    226220    hlp = settings.value("serialDataBits").toString();
    227     if (hlp == "5") {
    228       _serialPort->setDataBits(DATA_5);
     221    if        (hlp == "5") {
     222      _serialPort->setDataBits(QSerialPort::Data5);
    229223    } else if (hlp == "6") {
    230       _serialPort->setDataBits(DATA_6);
     224      _serialPort->setDataBits(QSerialPort::Data6);
    231225    } else if (hlp == "7") {
    232       _serialPort->setDataBits(DATA_7);
     226      _serialPort->setDataBits(QSerialPort::Data7);
    233227    } else if (hlp == "8") {
    234       _serialPort->setDataBits(DATA_8);
    235     }
     228      _serialPort->setDataBits(QSerialPort::Data8);
     229    }
     230    // Stop Bits
     231    // ---------
    236232    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);
    239237    } else if (hlp == "2") {
    240       _serialPort->setStopBits(STOP_2);
     238      _serialPort->setStopBits(QSerialPort::TwoStop);
    241239    }
    242240
     
    244242    // ------------
    245243    hlp = settings.value("serialFlowControl").toString();
    246     if (hlp == "XONXOFF") {
    247       _serialPort->setFlowControl(FLOW_XONXOFF);
     244    if        (hlp == "XONXOFF") {
     245      _serialPort->setFlowControl(QSerialPort::SoftwareControl);
    248246    } else if (hlp == "HARDWARE") {
    249       _serialPort->setFlowControl(FLOW_HARDWARE);
     247      _serialPort->setFlowControl(QSerialPort::HardwareControl);
    250248    } else {
    251       _serialPort->setFlowControl(FLOW_OFF);
     249      _serialPort->setFlowControl(QSerialPort::NoFlowControl);
    252250    }
    253251
    254252    // Open Serial Port
    255253    // ----------------
    256     _serialPort->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
     254    //_serialPort->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
     255    _serialPort->open(QIODevice::ReadWrite);
    257256    msleep(100); //sleep 0.1 sec
    258257    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));
    260260      delete _serialPort;
    261261      _serialPort = 0;
    262262    }
    263 
    264     connect(_serialPort, SIGNAL(readyRead()), this, SLOT(slotSerialReadyRead()));
     263    else {
     264      connect(_serialPort, SIGNAL(readyRead()), this, SLOT(slotSerialReadyRead()));
     265    }
    265266
    266267    // Automatic NMEA
  • trunk/BNC/src/bncgetthread.h

    r10423 r10766  
    4040
    4141class GPSDecoder;
    42 class QextSerialPort;
     42class QSerialPort;
    4343class latencyChecker;
    4444
     
    124124   int                        _ssrEpoch;
    125125   bncRawFile*                _rawFile;
    126    QextSerialPort*            _serialPort;
     126   QSerialPort*               _serialPort;
    127127   bool                       _isToBeDeleted;
    128128   bool                       _rtcmObs;
  • trunk/BNC/src/bncnetquerys.cpp

    r8204 r10766  
    1111 * Created:    8-Mar-2009
    1212 *
    13  * Changes:   
     13 * Changes:
    1414 *
    1515 * -----------------------------------------------------------------------*/
     
    3434}
    3535
    36 // 
     36//
    3737////////////////////////////////////////////////////////////////////////////
    3838void bncNetQueryS::stop() {
     
    4242#endif
    4343  _status = finished;
    44 } 
    45 
    46 // 
     44}
     45
     46//
    4747/////////////////////////////////////////////////////////////////////////////
    4848void bncNetQueryS::waitForRequestResult(const QUrl&, QByteArray&) {
    4949}
    5050
    51 // 
     51//
    5252////////////////////////////////////////////////////////////////////////////
    5353void bncNetQueryS::waitForReadyRead(QByteArray& outData) {
     
    7070
    7171  _url = url;
     72
    7273  if (_url.scheme().isEmpty()) {
    7374    _url.setScheme("http");
     
    7980  QString hlp;
    8081  QStringList hlpL;
    81   hlp = _url.host().toLatin1().replace("-"," ");
    82   hlpL = hlp.split(" ");
    8382
    8483  // Serial Port
    8584  // -----------
     85  hlp = _url.userInfo().replace("-"," ");
     86  hlpL = hlp.split(" ");
    8687  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];
    8990  } 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
    9396
    9497  // Baud Rate
    9598  // ---------
     99  hlp = _url.host().replace("-"," ");
     100  hlpL = hlp.split(" ");
    96101  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);
    108104  }
    109105  else if (hlp == "2400") {
    110     _serialPort->setBaudRate(BAUD2400);
     106    _serialPort->setBaudRate(QSerialPort::Baud2400);
    111107  }
    112108  else if (hlp == "4800") {
    113     _serialPort->setBaudRate(BAUD4800);
     109    _serialPort->setBaudRate(QSerialPort::Baud4800);
    114110  }
    115111  else if (hlp == "9600") {
    116     _serialPort->setBaudRate(BAUD9600);
     112    _serialPort->setBaudRate(QSerialPort::Baud9600);
    117113  }
    118114  else if (hlp == "19200") {
    119     _serialPort->setBaudRate(BAUD19200);
     115    _serialPort->setBaudRate(QSerialPort::Baud19200);
    120116  }
    121117  else if (hlp == "38400") {
    122     _serialPort->setBaudRate(BAUD38400);
     118    _serialPort->setBaudRate(QSerialPort::Baud38400);
    123119  }
    124120  else if (hlp == "57600") {
    125     _serialPort->setBaudRate(BAUD57600);
     121    _serialPort->setBaudRate(QSerialPort::Baud57600);
    126122  }
    127123  else if (hlp == "115200") {
    128     _serialPort->setBaudRate(BAUD115200);
     124    _serialPort->setBaudRate(QSerialPort::Baud115200);
    129125  }
    130126
     
    133129  hlp = hlpL[hlpL.size()-4].toUpper();
    134130  if      (hlp == "NONE") {
    135     _serialPort->setParity(PAR_NONE);
     131    _serialPort->setParity(QSerialPort::NoParity);
    136132  }
    137133  else if (hlp == "ODD") {
    138     _serialPort->setParity(PAR_ODD);
     134    _serialPort->setParity(QSerialPort::OddParity);
    139135  }
    140136  else if (hlp == "EVEN") {
    141     _serialPort->setParity(PAR_EVEN);
     137    _serialPort->setParity(QSerialPort::EvenParity);
    142138  }
    143139  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
    146146
    147147  // Data Bits
     
    149149  hlp = hlpL[hlpL.size()-5];
    150150  if      (hlp == "5") {
    151     _serialPort->setDataBits(DATA_5);
     151    _serialPort->setDataBits(QSerialPort::Data5);
    152152  }
    153153  else if (hlp == "6") {
    154     _serialPort->setDataBits(DATA_6);
     154    _serialPort->setDataBits(QSerialPort::Data6);
    155155  }
    156156  else if (hlp == "7") {
    157     _serialPort->setDataBits(DATA_7);
     157    _serialPort->setDataBits(QSerialPort::Data6);
    158158  }
    159159  else if (hlp == "8") {
    160     _serialPort->setDataBits(DATA_8);
     160    _serialPort->setDataBits(QSerialPort::Data7);
    161161  }
    162162
     
    165165  hlp = hlpL[hlpL.size()-3];
    166166  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);
    168171  }
    169172  else if (hlp == "2") {
    170     _serialPort->setStopBits(STOP_2);
     173    _serialPort->setStopBits(QSerialPort::TwoStop);
    171174  }
    172175
     
    175178  hlp = hlpL[hlpL.size()-2].toUpper();
    176179  if (hlp == "XONXOFF") {
    177     _serialPort->setFlowControl(FLOW_XONXOFF);
     180    _serialPort->setFlowControl(QSerialPort::SoftwareControl);
    178181  }
    179182  else if (hlp == "HARDWARE") {
    180     _serialPort->setFlowControl(FLOW_HARDWARE);
     183    _serialPort->setFlowControl(QSerialPort::HardwareControl);
    181184  }
    182185  else {
    183     _serialPort->setFlowControl(FLOW_OFF);
     186    _serialPort->setFlowControl(QSerialPort::NoFlowControl);
    184187  }
    185188
    186189  _status = running;
    187190
    188   _serialPort->open(QIODevice::ReadWrite|QIODevice::Unbuffered);
     191  //_serialPort->open(QIODevice::ReadWrite|QIODevice::Unbuffered);
     192  _serialPort->open(QIODevice::ReadWrite);
     193
    189194  if (!_serialPort->isOpen()) {
     195    emit newMessage(_url.path().toLatin1().replace(0,1,"") + ": Cannot open serial port " + _portString.toLatin1()
     196                    + ": " +_serialPort->errorString().toLatin1(), true);
    190197    delete _serialPort;
    191198    _serialPort = 0;
    192199    _status = error;
    193     emit newMessage(_url.path().toLatin1().replace(0,1,"") + ": Cannot open serial port " + _portString.toLatin1(), true);
    194200    return;
    195201  }
  • trunk/BNC/src/bncnetquerys.h

    r6787 r10766  
    33
    44#include "bncnetquery.h"
    5 #include "serial/qextserialport.h"
     5#include <QtSerialPort/QSerialPort>
    66
    77class bncNetQueryS : public bncNetQuery {
     
    1717
    1818 private:
    19   QextSerialPort* _serialPort;
     19  QSerialPort* _serialPort;
    2020};
    2121
  • trunk/BNC/src/bncserialport.cpp

    r10524 r10766  
    7474  _serialCountryLineEdit = new QLineEdit();
    7575
    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(","));
    7877  _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(","));
    7978  _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(","));
    8281
    8382  _serialBaudRateComboBox->setCurrentIndex(7);
     
    104103  _serialLonLineEdit->setWhatsThis(tr("<p>Enter the approximate latitude of the stream providing receiver in degrees.<p></p>Example: 45.32</p>"));
    105104  _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>"));
    107106  _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>"));
    108107  _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>"));
     
    184183       !_serialLonLineEdit->text().isEmpty() ) {
    185184    mountPoints->push_back("//"
    186       + _serialPortLineEdit->text().replace("/","-").replace(QRegExp("^[-]"), "") + "-"
     185      + _serialPortLineEdit->text().replace("/","-").replace(QRegExp("^[-]"), "") + "@"
    187186      + _serialDataBits + "-"
    188187      + _serialParity + "-"
  • trunk/BNC/src/bncversion.h

    r10755 r10766  
    33#define BNCVERSION_H
    44
    5 #define BNCVERSION "2.13.4"
     5#define BNCVERSION "2.13.5"
    66#define BNCPGMNAME "BNC " BNCVERSION
    77
  • trunk/BNC/src/bncwindow.cpp

    r10753 r10766  
    341341    _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
    342342    _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(","));
    345344    int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
    346345    if (kk != -1) {
     
    360359    }
    361360    _serialParityComboBox = new QComboBox();
    362     _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(","));
     361    _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE,MARK").split(","));
    363362    kk = _serialParityComboBox->findText(settings.value("serialParity").toString());
    364363    if (kk != -1) {
     
    366365    }
    367366    _serialStopBitsComboBox = new QComboBox();
    368     _serialStopBitsComboBox->addItems(QString("1,2").split(","));
     367    _serialStopBitsComboBox->addItems(QString("1,1.5,2").split(","));
    369368    kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString());
    370369    if (kk != -1) {
     
    15301529    // ------------------------
    15311530    _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>"));
    15331532    _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>"));
    15341533    _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>"));
     
    18881887        QUrl    url(hlp[0]);
    18891888
    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]);
    18921893        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";
    18991910        }
    19001911
     
    20532064    while (it.hasNext()) {
    20542065        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]);
    20582073        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";
    20652090        }
    20662091
     
    21022127
    21032128        it = new QTableWidgetItem(ntripVersion);
    2104         ////it->setFlags(it->flags() & ~Qt::ItemIsEditable);
     2129        //// it->setFlags(it->flags() & ~Qt::ItemIsEditable);
    21052130        _mountPointsTable->setItem(iRow, 7, it);
    21062131
     
    21332158    for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
    21342159
    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());
    21572171    }
    21582172
  • trunk/BNC/src/bncwindow.h

    r10753 r10766  
    6767    void CreateMenu();
    6868    void AddToolbar();
     69
    6970
    7071public slots:
     
    107108
    108109private:
     110
    109111    void saveOptions();
    110112    void populateMountPointsTable();
  • trunk/BNC/src/src.pri

    r10753 r10766  
    99QT += widgets
    1010QT += core
     11QT += serialport
    1112
    1213unix:QMAKE_CFLAGS_RELEASE   -= -O2
     
    1819release:MOC_DIR=.moc/release
    1920
    20 release:DEFINES += SPLITBLOCK
    21 debug:DEFINES   += SPLITBLOCK
     21release:DEFINES  += SPLITBLOCK
     22debug:DEFINES    += SPLITBLOCK
    2223#debug:DEFINES   += BNC_DEBUG_OBS
    2324#debug:DEFINES   += BNC_DEBUG_BCE
     
    2526#debug:DEFINES   += BNC_DEBUG_SSR
    2627#debug:DEFINES   += BNC_DEBUG_CMB
    27 #debug:DEFINES    += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
     28#debug:DEFINES   += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
    2829
    2930!versionAtLeast(QT_VERSION, 5.15.0):error("Use at least Qt version 5.15.0")
     
    7879          combination/bnccomb.h combination/bncbiassnx.h
    7980
    80 HEADERS       += serial/qextserialbase.h serial/qextserialport.h
    81 unix:HEADERS  += serial/posix_qextserialport.h
    82 win32:HEADERS += serial/win_qextserialport.h
    8381
    8482SOURCES = bncgetthread.cpp  bncwindow.cpp bnctabledlg.cpp             \
     
    121119          combination/bnccomb.cpp combination/bncbiassnx.cpp
    122120
    123 SOURCES       += serial/qextserialbase.cpp serial/qextserialport.cpp
    124 unix:SOURCES  += serial/posix_qextserialport.cpp
    125 win32:SOURCES += serial/win_qextserialport.cpp
    126 
    127121RC_FILE = bnc.rc
    128122
Note: See TracChangeset for help on using the changeset viewer.