Skip to content

Commit

Permalink
fix automatic sweep nValues logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nanovna committed Jan 24, 2020
1 parent 86f9959 commit 10310ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libxavna/xavna_cpp.C
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ namespace xaxaxa {
}
_dev = xavna_open(dev.c_str());
if(!_dev) throw runtime_error(strerror(errno));

if(isAutoSweep() != _lastDeviceIsAutosweep) {

bool a = isAutoSweep();
if(a != _lastDeviceIsAutosweep) {
if(isAutoSweep()) {
nValues = 2;
nWait = -1;
Expand All @@ -45,6 +46,7 @@ namespace xaxaxa {
nWait = 20;
}
}
_lastDeviceIsAutosweep = a;
}
bool VNADevice::isTR() {
if(!_dev) return true;
Expand Down

0 comments on commit 10310ef

Please sign in to comment.