Changeset 11116 in ntrip


Ignore:
Timestamp:
Oct 22, 2026, 5:05:56 PM (14 hours ago)
Author:
stuerze
Message:

minor changes to accept incomplete source table entries

File:
1 edited

Legend:

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

    r11022 r11116  
    282282    "misc").split(",");
    283283
     284  // STR lines are accepted if they contain at least the fields up to 'nmea'
     285  // (needed to add a stream); missing trailing fields of incomplete source
     286  // table entries are left empty
     287  // -------------------------------------------------------------------------
     288  const int MIN_FIELDS = 12; // STR + mountpoint ... nmea
    284289  QStringList lines;
    285290  QStringListIterator it(_allLines);
    … …  
    288293    if (line.indexOf("STR") == 0) {
    289294      QStringList hlp = line.split(";");
    290       if (hlp.size() > labels.size()) {
     295      if (hlp.size() >= MIN_FIELDS) {
    291296        lines.push_back(line);
    292297      }
    … …  
    301306    for (int nRow = 0; nRow < lines.size(); nRow++) {
    302307      QStringList columns = lines[nRow].split(";");
    303       for (int ic = 1; ic < columns.size(); ic++) {
     308      while (columns.size() <= labels.size()) {
     309        columns << QString();
     310      }
     311      for (int ic = 1; ic <= labels.size(); ic++) {
    304312            if (ic == 11) {
    305313          if (columns[ic] == "0") {
Note: See TracChangeset for help on using the changeset viewer.