Changeset 4795 in ntrip


Ignore:
Timestamp:
Oct 30, 2012, 3:23:08 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTRover/bncrtrover.cpp

    r4794 r4795  
    6464    opt._mode = mode_PPP_FTTF;
    6565  }
    66   opt._roverName      = strdup(_roverMount.data());
    67   opt._baseName       = strdup(_baseMount.data());
    68   opt._antNameRover   = strdup(settings.value("rtroverRoverAntenna").toByteArray().data());
    69   opt._antNameBase    = strdup(settings.value("rtroverBaseAntenna").toByteArray().data());
    70   opt._antexFileName  = strdup(settings.value("rtroverAntex").toByteArray().data());
     66
     67  QByteArray antNameRover  = settings.value("rtroverRoverAntenna").toByteArray();
     68  QByteArray antNameBase   = settings.value("rtroverBaseAntenna").toByteArray();
     69  QByteArray antexFileName = settings.value("rtroverAntex").toByteArray();
     70
     71  if (!_roverMount.isEmpty())   opt._roverName     = _roverMount.data();
     72  if (!_baseMount.isEmpty())    opt._baseName      = _baseMount.data();
     73  if (!antNameRover.isEmpty())  opt._antNameRover  = antNameRover.data();
     74  if (!antNameBase.isEmpty())   opt._antNameBase   = antNameBase.data();
     75  if (!antexFileName.isEmpty()) opt._antexFileName = antexFileName.data();
     76
    7177  opt._xyzAprRover[0] = settings.value("rtroverRoverRefCrdX").toDouble();
    7278  opt._xyzAprRover[1] = settings.value("rtroverRoverRefCrdY").toDouble();
     
    8490
    8591  rtrover_setOptions(&opt);
    86 
    87   free(opt._roverName);
    88   free(opt._baseName);
    89   free(opt._antNameRover);
    90   free(opt._antNameBase);
    91   free(opt._antexFileName);
    9292
    9393  // Connect to BNC Signals
Note: See TracChangeset for help on using the changeset viewer.