Skip to content

Commit

Permalink
[iioadaptor] Do not enable unused buffered mode for iio device
Browse files Browse the repository at this point in the history
  • Loading branch information
elros34 committed Sep 15, 2019
1 parent 0ec04bc commit 09972df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions adaptors/iioadaptor/iioadaptor.cpp
Expand Up @@ -146,8 +146,11 @@ void IioAdaptor::setup()
// setValid(false);
return;
}

if (mode() != SysfsAdaptor::IntervalMode) {
scanElementsEnable(devNodeNumber,1);
scanElementsEnable(devNodeNumber,0);
}

/* Override the scaling factor if asked */
bool ok;
Expand Down Expand Up @@ -521,6 +524,7 @@ bool IioAdaptor::startSensor()
return false;

qDebug() << Q_FUNC_INFO;
if (mode() != SysfsAdaptor::IntervalMode)
deviceEnable(devNodeNumber, true);
return SysfsAdaptor::startSensor();
}
Expand All @@ -530,6 +534,7 @@ void IioAdaptor::stopSensor()
if (devNodeNumber == -1)
return;
qDebug() << Q_FUNC_INFO;
if (mode() != SysfsAdaptor::IntervalMode)
deviceEnable(devNodeNumber, false);
SysfsAdaptor::stopSensor();
}

0 comments on commit 09972df

Please sign in to comment.