Skip to content

Commit

Permalink
Merge pull request #10 from tswindell/master
Browse files Browse the repository at this point in the history
[sensorfw] Fix in ALSAdaptor, logging and power.
  • Loading branch information
lpotter committed Sep 24, 2013
2 parents 5576ee9 + 2f4f479 commit 936f0d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adaptors/alsadaptor/alsadaptor.cpp
Expand Up @@ -102,7 +102,7 @@ void ALSAdaptor::disableALS()

bool ALSAdaptor::startSensor()
{
if(deviceType_ == NCDK && !powerStatePath_.isEmpty())
if(!powerStatePath_.isEmpty())
{
writeToFile(powerStatePath_, "1");
}
Expand All @@ -118,7 +118,7 @@ bool ALSAdaptor::startSensor()

void ALSAdaptor::stopSensor()
{
if(deviceType_ == NCDK && !powerStatePath_.isEmpty())
if(!powerStatePath_.isEmpty())
{
writeToFile(powerStatePath_, "0");
}
Expand Down Expand Up @@ -167,7 +167,7 @@ void ALSAdaptor::processSample(int pathId, int fd)
sensordLogW() << "read(): " << strerror(errno);
return;
}
sensordLogW() << "Ambient light value: " << als_data.lux;
sensordLogT() << "Ambient light value: " << als_data.lux;

TimedUnsigned* lux = alsBuffer_->nextSlot();
lux->value_ = als_data.lux;
Expand Down

0 comments on commit 936f0d8

Please sign in to comment.